@param int $min
@param string|null $field

@return \PSolr\Request\Facet

@see http://wiki.apache.org/solr/SimpleFacetParameters#facet.enum.cache.minDf
518232
public function setMinimumDocumentFrequency($min, $field = null)
    {
        $param = $this->buildParam('facet.enum.cache.minDf', $field);
        return $this->set($param, $min);
    }
1201633
public static function firstOrNull($fields = null)
    {
        static $request;
        if (!$request) {
            $request = Di::getDefault()->getShared('request');
        }

        if (!$request->isAjax()) {
            return null;
        }

        $model = new static();
        return static::get($request->getId($model->getPrimaryKey()));
    }
919135
public function setMin($min)
    {
        if (is_array($min) and isset($min['min'])) {
            $min = $min['min'];
        }

        if (!is_string($min) and !is_numeric($min)) {
            require_once 'Zend/Validate/Exception.php';
            throw new Zend_Validate_Exception ('Invalid options to validator provided');
        }

        $min = (integer) $min;
        if (($this->_max !== null) && ($min > $this->_max)) {
            require_once 'Zend/Validate/Exception.php';
            throw new Zend_Validate_Exception("The minimum must be less than or equal to the maximum file count, but $min >"
                                            . " {$this->_max}");
        }

        $this->_min = $min;
        return $this;
    }
666632
protected function setErrorLengthRange($field, $label, $min = 1, $max = 255)
    {
        $vars = array('@min' => $min, '@max' => $max, '@field' => $label);
        $error = $this->translation->text('@field must be @min - @max characters long', $vars);
        return $this->setError($field, $error);
    }
83714
public static function linspace($min, $max, $num = 50, $endpoint = true)
    {
        $range = $max - $min;

        if ($max == $min) {
            throw new \InvalidArgumentException(sprintf(
                'Min and max cannot be the same number: %s', $max
            ));
        }

        $unit = $range / ($endpoint ? $num - 1 : $num);
        $space = [];

        for ($value = $min; $value <= $max; $value += $unit) {
            $space[] = $value;
        }

        if ($endpoint === false) {
            array_pop($space);
        }

        return $space;
    }
902479
public function addFieldMin($field, $alias = null)
    {
        $this->addField(new Func('min', $field), $alias); return $this;
    }
713282
public function isNotNull($field)
    {
        return new Expr\ComparisonExpression($field, new Expr\ValueIdentifier(null), Expr\ComparisonExpression::NEQ);
    }
1192626
public function whereDateBetween($field, $min, $max)
    {
        if (!$this->_model) {
            throw new MisuseException('use whereDateBetween must provide model');
        }

        if ($min && strpos($min, ':') === false) {
            $min = (int)(is_numeric($min) ? $min : strtotime($min . ' 00:00:00'));
        }
        if ($max && strpos($max, ':') === false) {
            $max = (int)(is_numeric($max) ? $max : strtotime($max . ' 23:59:59'));
        }

        if ($format = $this->_model->getDateFormat($field)) {
            if (is_int($min)) {
                $min = date($format, $min);
            }
            if (is_int($max)) {
                $max = date($format, $max);
            }
        } else {
            if ($min && !is_int($min)) {
                $min = (int)strtotime($min);
            }
            if ($max && !is_int($max)) {
                $max = (int)strtotime($max);
            }
        }

        return $this->whereBetween($field, $min ?: null, $max ?: null);
    }
447919
public function toMin(callable $min = null)
    {
        if (null === $min) {
            // can't use min() as $smallest is initially null but actual
            // elements were not checked yet, and min() considers null to always
            // be the minimum value
            $min = function($smallest, $element)
                   {
                       return (null === $smallest || $element < $smallest) ? $element : $smallest;
                   };
        }

        return $this->with($min);
    }
1187935
public function min($field) {
        $this->statementContext->setFields("MIN({$field}) AS __MIN__");
        $row = $this->findOne();

        //SQL执行发生错误
        if ($row === false) {
            return false;
        }

        return $row['__MIN__'];
    }
359347
public function setMin(?string $min) : self
    {
        if ($min !== null) {
            $min = Decimal::parse($min);
        }

        $this->min = $min;

        return $this;
    }
640627
public function whereBetween($field, $min, $max)
    {
        foreach ($this->queries as $query) {
            $query->whereBetween($field, $min, $max);
        }

        return $this;
    }
364694
public function setMissing($missing, $field = null)
    {
        $param = $this->buildParam('facet.missing', $field);
        return $this->set($param, (bool) $missing);
    }
782445
public function setRangeGap($gap, $field = null)
    {
        $param = $this->buildParam('facet.range.gap', $field);
        return $this->set($param, $gap);
    }
508154
public function setMin(string $min)
    {
        $this->doSetMin($min);
        $this->getTag()->setAttribute('min', $min);

        return $this;
    }
847101
protected function validate_min_age($field, $input, $param = null)
    {
        if (!isset($input[$field]) || empty($input[$field])) {
            return;
        }

        $cdate1 = new DateTime(date('Y-m-d', strtotime($input[$field])));
        $today = new DateTime(date('d-m-Y'));

        $interval = $cdate1->diff($today);
        $age = $interval->y;

        if ($age <= $param) {
            return array(
                'field' => $field,
                'value' => $input[$field],
                'rule' => __FUNCTION__,
                'param' => $param,
            );
        }
    }
546689
public function setDateEnd($end, $field = null)
    {
        $param = $this->buildParam('facet.date.end', $field);
        return $this->set($param, $end);
    }