class OneToManyPersister extends AbstractCollectionPersister (View source)

Persister for one-to-many collections.

Properties

protected EntityManagerInterface $em from AbstractCollectionPersister
protected Connection $conn from AbstractCollectionPersister
protected UnitOfWork $uow from AbstractCollectionPersister
protected AbstractPlatform $platform The database platform. from AbstractCollectionPersister

Methods

__construct(EntityManagerInterface $em)

Initializes a new instance of a class derived from AbstractCollectionPersister.

bool
isValidEntityState(object $entity)

Check if entity is in a valid state for operations.

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.

mixed
get(PersistentCollection $collection, $index)

Gets an element by key.

int
count(PersistentCollection $collection)

Counts the size of this persistent collection.

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

Slices elements.

bool
containsKey(PersistentCollection $collection, $key)

Checks for existence of a key.

bool
contains(PersistentCollection $collection, $element)

Checks for existence of an element.

mixed
removeElement(PersistentCollection $collection, $element)

Removes an element.

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

Loads association entities matching the given Criteria object.

Details

__construct(EntityManagerInterface $em)

Initializes a new instance of a class derived from AbstractCollectionPersister.

Parameters

EntityManagerInterface $em

protected bool isValidEntityState(object $entity)

Check if entity is in a valid state for operations.

Parameters

object $entity

Return Value

bool

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

mixed get(PersistentCollection $collection, $index)

Gets an element by key.

Parameters

PersistentCollection $collection
$index

Return Value

mixed

int count(PersistentCollection $collection)

Counts the size of this persistent collection.

Parameters

PersistentCollection $collection

Return Value

int

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

Slices elements.

Parameters

PersistentCollection $collection
$offset
$length

Return Value

mixed[]

bool containsKey(PersistentCollection $collection, $key)

Checks for existence of a key.

Parameters

PersistentCollection $collection
$key

Return Value

bool

bool contains(PersistentCollection $collection, $element)

Checks for existence of an element.

Parameters

PersistentCollection $collection
$element

Return Value

bool

mixed removeElement(PersistentCollection $collection, $element)

Removes an element.

Parameters

PersistentCollection $collection
$element

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[]