abstract class AbstractPersistentCollectionFactory implements PersistentCollectionFactory (View source)

Abstract factory for creating persistent collection classes.

Methods

create(DocumentManager $dm, array $mapping, Collection $coll = null)

Creates specified persistent collection to work with given collection class.

Collection
createCollectionClass(string $collectionClass)

Creates instance of collection class to be wrapped by PersistentCollection.

Details

PersistentCollectionInterface create(DocumentManager $dm, array $mapping, Collection $coll = null)

Creates specified persistent collection to work with given collection class.

Parameters

DocumentManager $dm DocumentManager with which collection is associated
array $mapping Mapping of field holding collection
Collection $coll Collection to be decorated

Return Value

PersistentCollectionInterface

abstract protected Collection createCollectionClass(string $collectionClass)

Creates instance of collection class to be wrapped by PersistentCollection.

Parameters

string $collectionClass FQCN of class to instantiate

Return Value

Collection