scheduleCollectionDeletion() public méthode

INTERNAL: Schedules a complete collection for removal when this UnitOfWork commits.
public scheduleCollectionDeletion ( Doctrine\ODM\MongoDB\PersistentCollection\PersistentCollectionInterface $coll )
$coll Doctrine\ODM\MongoDB\PersistentCollection\PersistentCollectionInterface
 /**
  * {@inheritdoc}
  */
 public function clear()
 {
     if ($this->initialized && $this->isEmpty()) {
         return;
     }
     if ($this->isOrphanRemovalEnabled()) {
         $this->initialize();
         foreach ($this->coll as $element) {
             $this->uow->scheduleOrphanRemoval($element);
         }
     }
     $this->mongoData = array();
     $this->coll->clear();
     // Nothing to do for inverse-side collections
     if (!$this->mapping['isOwningSide']) {
         return;
     }
     // Nothing to do if the collection was initialized but contained no data
     if ($this->initialized && empty($this->snapshot)) {
         return;
     }
     $this->changed();
     $this->uow->scheduleCollectionDeletion($this);
     $this->takeSnapshot();
 }
 /**
  * {@inheritdoc}
  */
 public function clear()
 {
     if ($this->initialized && $this->isEmpty()) {
         return;
     }
     if ($this->isOrphanRemovalEnabled()) {
         foreach ($this->coll as $element) {
             $this->uow->scheduleOrphanRemoval($element);
         }
     }
     $this->mongoData = array();
     $this->coll->clear();
     if ($this->mapping['isOwningSide']) {
         $this->changed();
         $this->uow->scheduleCollectionDeletion($this);
         $this->takeSnapshot();
     }
 }