/** * 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; }
/** * 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; }