DefaultCollectionHydrator
in package
implements
CollectionHydrator
Default hydrator cache for collections
Interfaces, Classes, Traits and Enums
- CollectionHydrator
- Hydrator cache entry for collections
Table of Contents
- $em : EntityManagerInterface
- $hints : array<string, mixed>
- $uow : UnitOfWork
- __construct() : mixed
- buildCacheEntry() : CollectionCacheEntry
- loadCacheEntry() : array<string|int, mixed>
Properties
$em
private
EntityManagerInterface
$em
$hints
private
static array<string, mixed>
$hints
= [\Doctrine\ORM\Query::HINT_CACHE_ENABLED => true]
$uow
private
UnitOfWork
$uow
Methods
__construct()
public
__construct(EntityManagerInterface $em) : mixed
Parameters
- $em : EntityManagerInterface
-
The entity manager.
Return values
mixed —buildCacheEntry()
public
buildCacheEntry(ClassMetadata $metadata, CollectionCacheKey $key, mixed $collection) : CollectionCacheEntry
Parameters
- $metadata : ClassMetadata
-
The entity metadata.
- $key : CollectionCacheKey
-
The cached collection key.
- $collection : mixed
-
The collection.
Return values
CollectionCacheEntry —loadCacheEntry()
public
loadCacheEntry(ClassMetadata $metadata, CollectionCacheKey $key, CollectionCacheEntry $entry, PersistentCollection $collection) : array<string|int, mixed>
Parameters
- $metadata : ClassMetadata
-
The owning entity metadata.
- $key : CollectionCacheKey
-
The cached collection key.
- $entry : CollectionCacheEntry
-
The cached collection entry.
- $collection : PersistentCollection
-
The collection to load the cache into.