yii\sphinx\QueryBuilder::buildLimit PHP Метод

buildLimit() публичный Метод

public buildLimit ( integer $limit, integer $offset ) : string
$limit integer
$offset integer
Результат string the LIMIT and OFFSET clauses built from [[query]].
    public function buildLimit($limit, $offset)
    {
        $sql = '';
        if (is_int($offset) && $offset > 0 || is_string($offset) && ctype_digit($offset) && $offset !== '0') {
            $sql = 'LIMIT ' . $offset;
        }
        if (is_string($limit) && ctype_digit($limit) || is_int($limit) && $limit >= 0) {
            $sql = $sql === '' ? "LIMIT {$limit}" : "{$sql},{$limit}";
        } elseif ($sql !== '') {
            $sql .= ',1000';
            // this is the default limit by sphinx
        }
        return $sql;
    }