addAnd() public méthode

Add one or more $and clauses to the current query.
See also: Builder::addAnd()
See also: http://docs.mongodb.org/manual/reference/operator/and/
public addAnd ( array | Expr $expression )
$expression array | Expr
Exemple #1
0
 /**
  * Add an $and clause to the current query.
  *
  * You can create a new expression using the {@link Builder::expr()} method.
  *
  * @see Expr::addAnd()
  * @see http://docs.mongodb.org/manual/reference/operator/and/
  * @param array|Expr $expression
  * @return self
  */
 public function addAnd($expression)
 {
     $this->expr->addAnd($expression);
     return $this;
 }
 private function buildQueryForConjunction(Conjunction $conjunction, Expr $expr, PropertyId $currentProperty = null)
 {
     foreach ($conjunction->getDescriptions() as $description) {
         $expr->addAnd($this->buildQueryForDescription($description, new Expr(), $currentProperty));
     }
     return $expr;
 }
Exemple #3
0
 /**
  * Add one or more $and clauses to the current query.
  *
  * You can create a new expression using the {@link Builder::matchExpr()}
  * method.
  *
  * @see Expr::addAnd()
  * @see http://docs.mongodb.org/manual/reference/operator/and/
  * @param array|Expr $expression
  * @return $this
  */
 public function addAnd($expression)
 {
     $this->query->addAnd(...func_get_args());
     return $this;
 }