abstract class AbstractCollectionPersister implements CachedCollectionPersister (View source)

Properties

protected UnitOfWork $uow
protected ClassMetadataFactory $metadataFactory
protected CollectionPersister $persister
protected ClassMetadata $sourceEntity
protected ClassMetadata $targetEntity
protected array $association
protected array $queuedCache
protected Region $region
protected string $regionName
protected CollectionHydrator $hydrator
protected CacheLogger $cacheLogger

Methods

__construct(CollectionPersister $persister, Region $region, EntityManagerInterface $em, array $association)

No description

getCacheRegion()

Gets the The region access.

void
storeCollectionCache(CollectionCacheKey $key, array|Collection $elements)

Stores a collection into cache

boolean
contains(PersistentCollection $collection, object $element)

Checks for existence of an element.

boolean
containsKey(PersistentCollection $collection, mixed $key)

Checks for existence of a key.

integer
count(PersistentCollection $collection)

Counts the size of this persistent collection.

mixed
get(PersistentCollection $collection, mixed $index)

Gets an element by key.

mixed
removeElement(PersistentCollection $collection, object $element)

Removes an element.

array
slice(PersistentCollection $collection, integer $offset, integer $length = null)

Slices elements.

array
loadCriteria(PersistentCollection $collection, Criteria $criteria)

Loads association entities matching the given Criteria object.

evictCollectionCache(PersistentCollection $collection)

Clears cache entries related to the current collection

evictElementCache(string $targetEntity, object $element)

No description

Details

__construct(CollectionPersister $persister, Region $region, EntityManagerInterface $em, array $association)

Parameters

CollectionPersister $persister The collection persister that will be cached.
Region $region The collection region.
EntityManagerInterface $em The entity manager.
array $association The association mapping.

Region getCacheRegion()

Gets the The region access.

Return Value

Region

ClassMetadata getSourceEntityMetadata()

Return Value

ClassMetadata

ClassMetadata getTargetEntityMetadata()

Return Value

ClassMetadata

PersistentCollection|null loadCollectionCache(PersistentCollection $collection, CollectionCacheKey $key)

Parameters

PersistentCollection $collection
CollectionCacheKey $key

Return Value

PersistentCollection|null

void storeCollectionCache(CollectionCacheKey $key, array|Collection $elements)

Stores a collection into cache

Parameters

CollectionCacheKey $key
array|Collection $elements

Return Value

void

boolean contains(PersistentCollection $collection, object $element)

Checks for existence of an element.

Parameters

PersistentCollection $collection
object $element

Return Value

boolean

boolean containsKey(PersistentCollection $collection, mixed $key)

Checks for existence of a key.

Parameters

PersistentCollection $collection
mixed $key

Return Value

boolean

integer count(PersistentCollection $collection)

Counts the size of this persistent collection.

Parameters

PersistentCollection $collection

Return Value

integer

mixed get(PersistentCollection $collection, mixed $index)

Gets an element by key.

Parameters

PersistentCollection $collection
mixed $index

Return Value

mixed

mixed removeElement(PersistentCollection $collection, object $element)

Removes an element.

Parameters

PersistentCollection $collection
object $element

Return Value

mixed

array slice(PersistentCollection $collection, integer $offset, integer $length = null)

Slices elements.

Parameters

PersistentCollection $collection
integer $offset
integer $length

Return Value

array

array loadCriteria(PersistentCollection $collection, Criteria $criteria)

Loads association entities matching the given Criteria object.

Parameters

PersistentCollection $collection
Criteria $criteria

Return Value

array

protected evictCollectionCache(PersistentCollection $collection)

Clears cache entries related to the current collection

Parameters

PersistentCollection $collection

protected evictElementCache(string $targetEntity, object $element)

Parameters

string $targetEntity
object $element