class ReadOnlyCachedCollectionPersister extends NonStrictReadWriteCachedCollectionPersister (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 AssociationMetadata $association from AbstractCollectionPersister
protected mixed[][] $queuedCache from AbstractCollectionPersister
protected Region $region from AbstractCollectionPersister
protected string $regionName from AbstractCollectionPersister
protected CollectionHydrator $hydrator from AbstractCollectionPersister
protected CacheLogger $cacheLogger from AbstractCollectionPersister

Methods

getCacheRegion()

Gets the The region access.

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

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, 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

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