abstract class AbstractCollectionPersister implements CachedCollectionPersister (View source)

Properties

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

Methods

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

No description

getCacheRegion()

Gets the The region access.

PersistentCollection|mixed[]|null
loadCollectionCache(PersistentCollection $collection, CollectionCacheKey $key)

No description

void
storeCollectionCache(CollectionCacheKey $key, $elements)

Stores a collection into cache

bool
contains(PersistentCollection $collection, $element)

Checks for existence of an element.

bool
containsKey(PersistentCollection $collection, $key)

Checks for existence of a key.

int
count(PersistentCollection $collection)

Counts the size of this persistent collection.

mixed
get(PersistentCollection $collection, $index)

Gets an element by key.

mixed
removeElement(PersistentCollection $collection, $element)

Removes an element.

mixed[]
slice(PersistentCollection $collection, $offset, $length = null)

Slices elements.

mixed[]
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, AssociationMetadata $association)

Parameters

CollectionPersister $persister The collection persister that will be cached.
Region $region The collection region.
EntityManagerInterface $em The entity manager.
AssociationMetadata $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|mixed[]|null loadCollectionCache(PersistentCollection $collection, CollectionCacheKey $key)

Parameters

PersistentCollection $collection
CollectionCacheKey $key

Return Value

PersistentCollection|mixed[]|null

void storeCollectionCache(CollectionCacheKey $key, $elements)

Stores a collection into cache

Parameters

CollectionCacheKey $key
$elements

Return Value

void

bool contains(PersistentCollection $collection, $element)

Checks for existence of an element.

Parameters

PersistentCollection $collection
$element

Return Value

bool

bool containsKey(PersistentCollection $collection, $key)

Checks for existence of a key.

Parameters

PersistentCollection $collection
$key

Return Value

bool

int count(PersistentCollection $collection)

Counts the size of this persistent collection.

Parameters

PersistentCollection $collection

Return Value

int

mixed get(PersistentCollection $collection, $index)

Gets an element by key.

Parameters

PersistentCollection $collection
$index

Return Value

mixed

mixed removeElement(PersistentCollection $collection, $element)

Removes an element.

Parameters

PersistentCollection $collection
$element

Return Value

mixed

mixed[] slice(PersistentCollection $collection, $offset, $length = null)

Slices elements.

Parameters

PersistentCollection $collection
$offset
$length

Return Value

mixed[]

mixed[] loadCriteria(PersistentCollection $collection, Criteria $criteria)

Loads association entities matching the given Criteria object.

Parameters

PersistentCollection $collection
Criteria $criteria

Return Value

mixed[]

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