Doctrine\MongoDB\Query\Builder::findAndRemove PHP Method

findAndRemove() public method

Change the query type to findAndRemove (uses the findAndModify command).
See also: http://docs.mongodb.org/manual/reference/command/findAndModify/
public findAndRemove ( )
    public function findAndRemove()
    {
        $this->query['type'] = Query::TYPE_FIND_AND_REMOVE;
        return $this;
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * @param string $documentName
  * @return Builder
  */
 public function findAndRemove($documentName = null)
 {
     $this->setDocumentName($documentName);
     parent::findAndRemove();
     return $this;
 }