ifNull() public method

The arguments can be any valid expression.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/ifNull/
public ifNull ( mixed | self $expression, mixed | self $replacementExpression )
$expression mixed | self
$replacementExpression mixed | self
Beispiel #1
0
 /**
  * Evaluates an expression and returns the value of the expression if the
  * expression evaluates to a non-null value. If the expression evaluates to
  * a null value, including instances of undefined values or missing fields,
  * returns the value of the replacement expression.
  *
  * The arguments can be any valid expression.
  *
  * @see http://docs.mongodb.org/manual/reference/operator/aggregation/ifNull/
  * @see Expr::ifNull
  * @param mixed|Expr $expression
  * @param mixed|Expr $replacementExpression
  * @return self
  */
 public function ifNull($expression, $replacementExpression)
 {
     $this->expr->ifNull($expression, $replacementExpression);
     return $this;
 }