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

update() public method

Change the query type to update.
Deprecation: Deprecated in version 1.4 - use updateOne or updateMany instead
public update ( )
    public function update()
    {
        $this->query['type'] = Query::TYPE_UPDATE;
        return $this;
    }

Usage Example

示例#1
0
 /**
  * @param string $documentName
  * @return Builder
  */
 public function update($documentName = null)
 {
     $this->setDocumentName($documentName);
     parent::update();
     return $this;
 }