remove() public method

Deletes a document as part of the current unit of work.
public remove ( object $document )
$document object The document to remove.
Esempio n. 1
0
 /**
  * Removes a document instance.
  *
  * A removed document will be removed from the database at or before transaction commit
  * or as a result of the flush operation.
  *
  * @param object $document The document instance to remove.
  */
 public function remove($document)
 {
     if (!is_object($document)) {
         throw new \InvalidArgumentException(gettype($document));
     }
     $this->errorIfClosed();
     $this->unitOfWork->remove($document);
 }