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

min() public method

Updates the value of the field to a specified value if the specified value is less than the current value of the field.
See also: Builder::min()
See also: http://docs.mongodb.org/manual/reference/operator/update/min/
public min ( mixed $value )
$value mixed
    public function min($value)
    {
        $this->requiresCurrentField();
        $this->newObj['$min'][$this->currentField] = $value;
        return $this;
    }

Usage Example

Example #1
0
 /**
  * Updates the value of the field to a specified value if the specified value is less than the current value of the field.
  *
  * @see Expr::min()
  * @see http://docs.mongodb.org/manual/reference/operator/update/min/
  * @param mixed $value
  * @return self
  */
 public function min($value)
 {
     $this->expr->min($value);
     return $this;
 }