getVisitedCollections() public method

INTERNAL: Gets PersistentCollections that have been visited during computing change set of $document
public getVisitedCollections ( object $document ) : Doctrine\ODM\MongoDB\PersistentCollection\PersistentCollectionInterface[]
$document object
return Doctrine\ODM\MongoDB\PersistentCollection\PersistentCollectionInterface[]
示例#1
0
 private function handleCollections($document, $options)
 {
     // Collection deletions (deletions of complete collections)
     foreach ($this->uow->getScheduledCollections($document) as $coll) {
         if ($this->uow->isCollectionScheduledForDeletion($coll)) {
             $this->cp->delete($coll, $options);
         }
     }
     // Collection updates (deleteRows, updateRows, insertRows)
     foreach ($this->uow->getScheduledCollections($document) as $coll) {
         if ($this->uow->isCollectionScheduledForUpdate($coll)) {
             $this->cp->update($coll, $options);
         }
     }
     // Take new snapshots from visited collections
     foreach ($this->uow->getVisitedCollections($document) as $coll) {
         $coll->takeSnapshot();
     }
 }