gte() public method

false when the first value is less than the second value.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/gte/
public gte ( mixed | self $expression1, mixed | self $expression2 )
$expression1 mixed | self
$expression2 mixed | self
Esempio n. 1
0
 public function testCond()
 {
     $if = new Expr();
     $if->gte('$field', 5);
     $expr = new Expr();
     $this->assertSame($expr, $expr->cond($if, '$field', '$otherField'));
     $this->assertSame(array('$cond' => array('if' => array('$gte' => array('$field', 5)), 'then' => '$field', 'else' => '$otherField')), $expr->getExpression());
 }
Esempio n. 2
0
 /**
  * Compares two values and returns:
  * true when the first value is greater than or equivalent to the second value.
  * false when the first value is less than the second value.
  *
  * @see http://docs.mongodb.org/manual/reference/operator/aggregation/gte/
  * @see Expr::gte
  * @param mixed|Expr $expression1
  * @param mixed|Expr $expression2
  * @return self
  */
 public function gte($expression1, $expression2)
 {
     $this->expr->gte($expression1, $expression2);
     return $this;
 }