cond() public méthode

The arguments can be any valid expression.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/cond/
public cond ( mixed | self $if, mixed | self $then, mixed | self $else )
$if mixed | self
$then mixed | self
$else mixed | self
Exemple #1
0
 /**
  * Evaluates a boolean expression to return one of the two specified return
  * expressions.
  *
  * The arguments can be any valid expression.
  *
  * @see http://docs.mongodb.org/manual/reference/operator/aggregation/cond/
  * @see Expr::cond
  * @param mixed|Expr $if
  * @param mixed|Expr $then
  * @param mixed|Expr $else
  * @return self
  */
 public function cond($if, $then, $else)
 {
     $this->expr->cond($if, $then, $else);
     return $this;
 }