PHP Class Doctrine\ODM\MongoDB\Persisters\CollectionPersister

Since: 1.0
Datei anzeigen Open project: pmjones/php-framework-benchmarks Class Usage Examples

Public Methods

Method Description
__construct ( DocumentManager $dm, PersistenceBuilder $pb, UnitOfWork $uow, string $cmd ) Contructs a new CollectionPersister instance.
delete ( PersistentCollection $coll, array $options ) Deletes a PersistentCollection instance completely from a document using $unset.
update ( PersistentCollection $coll, array $options ) Updates a PersistentCollection instance deleting removed rows and inserting new rows.

Private Methods

Method Description
deleteRows ( PersistentCollection $coll, array $options ) Deletes removed rows from a PersistentCollection instance.
executeQuery ( object $document, array $query, array $options ) Executes a query updating the given document.
getDocumentId ( object $document, ClassMetadata $class ) : mixed Gets the document database identifier value for the given document.
getPathAndParent ( PersistentCollection $coll ) : array Gets the parent information for a given PersistentCollection. It will retrieve the top level persistent @Document that the PersistentCollection lives in. We can use this to issue queries when updating a PersistentCollection that is multiple levels deep inside an embedded document.
insertRows ( PersistentCollection $coll, array $options ) Inserts new rows for a PersistentCollection instance.

Method Details

__construct() public method

Contructs a new CollectionPersister instance.
public __construct ( DocumentManager $dm, PersistenceBuilder $pb, UnitOfWork $uow, string $cmd )
$dm Doctrine\ODM\MongoDB\DocumentManager
$pb PersistenceBuilder
$uow Doctrine\ODM\MongoDB\UnitOfWork
$cmd string

delete() public method

Deletes a PersistentCollection instance completely from a document using $unset.
public delete ( PersistentCollection $coll, array $options )
$coll Doctrine\ODM\MongoDB\PersistentCollection
$options array

update() public method

Updates a PersistentCollection instance deleting removed rows and inserting new rows.
public update ( PersistentCollection $coll, array $options )
$coll Doctrine\ODM\MongoDB\PersistentCollection
$options array