isScheduledForDelete() public méthode

Checks whether a document is registered as removed/deleted with the unit of work.
public isScheduledForDelete ( object $document ) : boolean
$document object
Résultat boolean
Exemple #1
0
 /**
  * Determines whether a document instance is managed in this DocumentManager.
  *
  * @param object $document
  * @return boolean TRUE if this DocumentManager currently manages the given document, FALSE otherwise.
  */
 public function contains($document)
 {
     if (!is_object($document)) {
         throw new \InvalidArgumentException(gettype($document));
     }
     return $this->unitOfWork->isScheduledForInsert($document) || $this->unitOfWork->isInIdentityMap($document) && !$this->unitOfWork->isScheduledForDelete($document);
 }
 /**
  * Determines whether a document instance is managed in this DocumentManager.
  *
  * @param object $document
  * @return boolean TRUE if this DocumentManager currently manages the given document, FALSE otherwise.
  */
 public function contains($document)
 {
     return $this->unitOfWork->isScheduledForInsert($document) || $this->unitOfWork->isInIdentityMap($document) && !$this->unitOfWork->isScheduledForDelete($document);
 }