gt() public method

Specify $gt criteria for the current field.
See also: Builder::gt()
See also: http://docs.mongodb.org/manual/reference/operator/gt/
public gt ( mixed $value )
$value mixed
Beispiel #1
0
 /**
  * Specify $gt criteria for the current field.
  *
  * @see Expr::gt()
  * @see http://docs.mongodb.org/manual/reference/operator/gt/
  * @param mixed $value
  * @return $this
  */
 public function gt($value)
 {
     $this->query->gt($value);
     return $this;
 }
Beispiel #2
0
 /**
  * Specify $gt criteria for the current field.
  *
  * @see Expr::gt()
  * @see http://docs.mongodb.org/manual/reference/operator/gt/
  * @param mixed $value
  * @return self
  */
 public function gt($value)
 {
     $this->expr->gt($value);
     return $this;
 }
Beispiel #3
0
 public function testPullWithExpression()
 {
     $expr = new Expr();
     $nestedExpr = new Expr();
     $nestedExpr->gt(3);
     $this->assertSame($expr, $expr->field('a')->pull($nestedExpr));
     $this->assertEquals(array('$pull' => array('a' => array('$gt' => 3))), $expr->getNewObj());
 }