CollectionPersister
in
Define the behavior that should be implemented by all collection persisters.
Table of Contents
Methods
- contains() : bool
- Checks for existence of an element.
- containsKey() : bool
- Checks for existence of a key.
- count() : int
- Counts the size of this persistent collection.
- delete() : void
- Deletes the persistent state represented by the given collection.
- get() : mixed
- Gets an element by key.
- loadCriteria() : array<string|int, mixed>
- Loads association entities matching the given Criteria object.
- slice() : array<string|int, mixed>
- Slices elements.
- update() : void
- Updates the given collection, synchronizing its state with the database by inserting, updating and deleting individual elements.
Methods
contains()
Checks for existence of an element.
public
contains(PersistentCollection $collection, object $element) : bool
Parameters
- $collection : PersistentCollection
- $element : object
Return values
boolcontainsKey()
Checks for existence of a key.
public
containsKey(PersistentCollection $collection, mixed $key) : bool
Parameters
- $collection : PersistentCollection
- $key : mixed
Return values
boolcount()
Counts the size of this persistent collection.
public
count(PersistentCollection $collection) : int
Parameters
- $collection : PersistentCollection
Return values
intdelete()
Deletes the persistent state represented by the given collection.
public
delete(PersistentCollection $collection) : void
Parameters
- $collection : PersistentCollection
get()
Gets an element by key.
public
get(PersistentCollection $collection, mixed $index) : mixed
Parameters
- $collection : PersistentCollection
- $index : mixed
loadCriteria()
Loads association entities matching the given Criteria object.
public
loadCriteria(PersistentCollection $collection, Criteria $criteria) : array<string|int, mixed>
Parameters
- $collection : PersistentCollection
- $criteria : Criteria
Return values
array<string|int, mixed>slice()
Slices elements.
public
slice(PersistentCollection $collection, int $offset[, int|null $length = null ]) : array<string|int, mixed>
Parameters
- $collection : PersistentCollection
- $offset : int
- $length : int|null = null
Return values
array<string|int, mixed>update()
Updates the given collection, synchronizing its state with the database by inserting, updating and deleting individual elements.
public
update(PersistentCollection $collection) : void
Parameters
- $collection : PersistentCollection