Doctrine\ORM\Internal\Hydration\ObjectHydrator
The ObjectHydrator constructs an object graph out of an SQL result set.
- Author: Roman Borschel <roman@code-factory.org>
Synopsis
class ObjectHydrator
extends AbstractHydrator
{
- // members
- private array $_ce;
- private $_identifierMap;
- private $_resultPointers;
- private $_idTemplate;
- private $_resultCounter;
- private array $_rootAliases;
- private array $_initializedCollections;
- private array $_existingCollections;
- // Inherited members from AbstractHydrator
- protected ResultSetMapping $_rsm;
- protected EntityManager $_em;
- protected AbstractPlatform $_platform;
- protected UnitOfWork $_uow;
- protected array $_cache;
- protected Statement $_stmt;
- protected array $_hints;
- // methods
- protected void prepare()
- protected void cleanup()
- protected void hydrateAllData()
- private void _initRelatedCollection()
- private _getEntity()
- private mixed _getEntityFromIdentityMap()
- private ClassMetadata _getClassMetadata()
- protected void hydrateRowData()
- public void onClear()
- // Inherited methods from AbstractHydrator
- public void __construct()
- public IterableResult iterate()
- public mixed hydrateAll()
- public mixed hydrateRow()
- protected void prepare()
- protected void cleanup()
- protected void hydrateRowData()
- protected abstract void hydrateAllData()
- protected array gatherRowData()
- protected array gatherScalarRowData()
- protected void registerManaged()
- public void onClear()
Hierarchy
Tasks
Line | Task |
---|---|
256 | Abstract this code and UnitOfWork::createEntity() equivalent? |
348 | Add special case code where we hydrate the right join objects into identity map at least |
361+ | The "$id" generation is the same of UnitOfWork#createEntity. Remove this duplication somehow |
Members
private
- $_ce
- $_existingCollections
- $_idTemplate
- $_identifierMap
- $_initializedCollections
- $_resultCounter
- $_resultPointers
- $_rootAliases
protected
- $_cache — array
- $_em — Doctrine\ORM\EntityManager
- $_hints — array
- $_platform — \Doctrine\DBAL\Platforms\AbstractPlatform
- $_rsm — \Doctrine\ORM\Query\ResultSetMapping
- $_stmt — \Doctrine\DBAL\Driver\Statement
- $_uow — \Doctrine\ORM\UnitOfWork
Methods
private
- _getClassMetadata() — Gets a ClassMetadata instance from the local cache.
- _getEntity() — Gets an entity instance.
- _getEntityFromIdentityMap()
- _initRelatedCollection() — Initializes a related collection.
protected
- cleanup() — {@inheritdoc}
- hydrateAllData() — {@inheritdoc}
- hydrateRowData() — Hydrates a single row in an SQL result set.
- prepare()
public
- onClear() — When executed in a hydrate() loop we may have to clear internal state to decrease memory consumption.
Inherited from Doctrine\ORM\Internal\Hydration\AbstractHydrator
protected
- cleanup() — Excutes one-time cleanup tasks at the end of a hydration that was initiated through {@link hydrateAll} or {@link iterate()}.
- gatherRowData() — Processes a row of the result set.
- gatherScalarRowData() — Processes a row of the result set.
- hydrateAllData() — Hydrates all rows from the current statement instance at once.
- hydrateRowData() — Hydrates a single row from the current statement instance.
- prepare() — Excutes one-time preparation tasks, once each time hydration is started through {@link hydrateAll} or {@link iterate()}.
- registerManaged() — Register entity as managed in UnitOfWork.
public
- hydrateAll() — Hydrates all rows returned by the passed statement instance at once.
- hydrateRow() — Hydrates a single row returned by the current statement instance during row-by-row hydration with {@link iterate()}.
- iterate() — Initiates a row-by-row hydration.
- onClear() — When executed in a hydrate() loop we have to clear internal state to decrease memory consumption.