Doctrine\MongoDB\Query\Expr::unsetField PHP Метод

unsetField() публичный Метод

The field will be removed from the document (not set to null).
См. также: Builder::unsetField()
См. также: http://docs.mongodb.org/manual/reference/operator/unset/
public unsetField ( )
    public function unsetField()
    {
        $this->requiresCurrentField();
        $this->newObj['$unset'][$this->currentField] = 1;
        return $this;
    }

Usage Example

Пример #1
0
 /**
  * Unset the current field.
  *
  * The field will be removed from the document (not set to null).
  *
  * @see Expr::unsetField()
  * @see http://docs.mongodb.org/manual/reference/operator/unset/
  * @return self
  */
 public function unsetField()
 {
     $this->expr->unsetField();
     return $this;
 }