class ReadWriteCachedCollectionPersister extends AbstractCollectionPersister (View source)

Properties

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

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

afterTransactionComplete()

Perform whatever processing is encapsulated here after completion of the transaction.

afterTransactionRolledBack()

Perform whatever processing is encapsulated here after completion of the rolled-back.

void
delete(PersistentCollection $collection)

Deletes the persistent state represented by the given collection.

void
update(PersistentCollection $collection)

Updates the given collection, synchronizing its state with the database by inserting, updating and deleting individual elements.

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

afterTransactionComplete()

Perform whatever processing is encapsulated here after completion of the transaction.

afterTransactionRolledBack()

Perform whatever processing is encapsulated here after completion of the rolled-back.

void delete(PersistentCollection $collection)

Deletes the persistent state represented by the given collection.

Parameters

PersistentCollection $collection

Return Value

void

void update(PersistentCollection $collection)

Updates the given collection, synchronizing its state with the database by inserting, updating and deleting individual elements.

Parameters

PersistentCollection $collection

Return Value

void