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