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

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

Add one or more $nor clauses to the current query.
См. также: Builder::addNor()
См. также: http://docs.mongodb.org/manual/reference/operator/nor/
public addNor ( array | Expr $expression )
$expression array | Expr
    public function addNor($expression)
    {
        if (!isset($this->query['$nor'])) {
            $this->query['$nor'] = [];
        }
        $this->query['$nor'] = array_merge($this->query['$nor'], array_map(function ($expression) {
            return $expression instanceof Expr ? $expression->getQuery() : $expression;
        }, func_get_args()));
        return $this;
    }

Usage Example

Пример #1
0
 /**
  * Add a $nor clause to the current query.
  *
  * You can create a new expression using the {@link Builder::expr()} method.
  *
  * @see Expr::addNor()
  * @see http://docs.mongodb.org/manual/reference/operator/nor/
  * @param array|Expr $expression
  * @return self
  */
 public function addNor($expression)
 {
     $this->expr->addNor($expression);
     return $this;
 }
All Usage Examples Of Doctrine\MongoDB\Query\Expr::addNor