Doctrine\MongoDB\Query\Expr::range PHP Method

range() public method

This method is shorthand for specifying $gte criteria on the lower bound and $lt criteria on the upper bound. The upper bound is not inclusive.
See also: Builder::range()
public range ( mixed $start, mixed $end )
$start mixed
$end mixed
    public function range($start, $end)
    {
        return $this->operator('$gte', $start)->operator('$lt', $end);
    }

Usage Example

示例#1
0
 /**
  * Specify $gte and $lt criteria for the current field.
  *
  * This method is shorthand for specifying $gte criteria on the lower bound
  * and $lt criteria on the upper bound. The upper bound is not inclusive.
  *
  * @see Expr::range()
  * @param mixed $start
  * @param mixed $end
  * @return self
  */
 public function range($start, $end)
 {
     $this->expr->range($start, $end);
     return $this;
 }
All Usage Examples Of Doctrine\MongoDB\Query\Expr::range