Limits the number of blocks in this region.

Null means unlimited number.

@param null|int $number Defaults to null
@return \Block\View\Region
767619
public function blockLimit($number = null)
    {
        $number = $number !== null ? intval($number) : $number;
        $this->_blockLimit = $number;

        return $this;
    }
239601
public static function bound($number, $min = 0, $max = PHP_INT_MAX)
    {
        $number = (int)$number;
        $min = (int)$min;
        $max = (int)$max;

        return min(max($number, $min), $max);
    }
106967
public function limit($limit = 0, $offset = 0)
    {
        if (!$limit) {
            return $this;
        }
        if ($offset) {
            $limit .= " OFFSET {$offset}";
        }
        $this->_parts['limit'] = $limit;
        return $this;
    }
67972
public function derived(Number $x, Number $limit = null): Number
    {
        $limit = $limit ?? Tangent::limit();

        return divide(
            subtract(
                $this(add($x, $limit)),
                $this($x)
            ),
            $limit
        );
    }
1271836
public function setNow($number)
    {
        $this->now = (int)$number;
        $this->attributes->addAttribute('aria-valuenow', $this->now);

        if ($this->now < 10) {
            $this->attributes->addAttribute('style',
                'min-width: ' . 3 . 'em; width: ' . $this->now . '%;');
        } else {
            $this->attributes->addAttribute('style', 'width: ' . $this->now . '%;');
        }

        $this->label->textContent->push($this->now . ' ' . language()->getLine('Complete'));

        return $this;
    }
1085916
public function withNumber($number)
    {
        $card = $this->with('number', $number);
        $card->detectBrand();
        $card->token = null;
        $card->bin = substr($number, 0, 6);

        return $card;
    }
972974
public function limit($limit, $start = null)
    {
        if(is_int($limit)) {
            $build = $limit;
            if(is_int($start)) {
                $build = $start.', '.$limit;
            }
            $this->limit = ' LIMIT '.$build;
        }
        return $this;
    }
1084243
public function limit($limit)
    {
        if (null !== $limit) {
            if (!is_numeric($limit) || $limit != (int) $limit) {
                throw new \InvalidArgumentException('The limit is not valid.');
            }
            $limit = (int) $limit;
        }

        $this->limit = $limit;

        return $this;
    }
977087
public function less($number)
    {
        if (!is_int($number) && !is_float($number)) {
            throw new InvalidIntOrFloatException('number', $number);
        }

        if (!is_int($this->value) && !is_float($this->value)) {
            throw new InvalidIntOrFloatException($this->name, $this->value);
        } elseif ($this->value > $number) {
            throw new NumberNotLessException($this->name, $this->value, $number);
        }

        return $this;
    }
1087287
public function block($enabled = null)
    {
        if (is_null($enabled)) {
            $enabled = !$this->isBlock;
        }

        $this->isBlock = $enabled;

        return $this;
    }
981716
public static function limit($number, $min, $max): int
    {
        return self::max(self::min($number, $min), $max);
    }
1176041
public function limit($offset, $number) {
        $limit = rand(0, 50);
        $this->_query .= ' LIMIT :limit_offset_' . $limit . ', :limit_number_' . $limit;

        $this->vars('limit_offset_' . $limit, [$offset, Sql::PARAM_INT]);
        $this->vars('limit_number_' . $limit, [$number, Sql::PARAM_INT]);

        return $this;
    }
349090
public function lessStrict($number)
    {
        if (!is_int($number) && !is_float($number)) {
            throw new InvalidIntOrFloatException('number', $number);
        }

        if (!is_int($this->value) && !is_float($this->value)) {
            throw new InvalidIntOrFloatException($this->name, $this->value);
        } elseif ($this->value >= $number) {
            throw new NumberNotLessStrictlyException($this->name, $this->value, $number);
        }

        return $this;
    }
555347
public function limit(int $number)
    {
        $instance = $this->limitStrategyInstance();

        $instance->limitStrategy()->limit($number);

        return $instance;
    }
314099
public function from($number, $name = null)
    {
        $this->senderNumber = $number;

        $this->senderName = $name;

        return $this;
    }
809378
public function lookahead($number = 1)
    {
        $fetch = $number - count($this->stash);

        while ($fetch-- > 0) {
            $this->stash[] = $this->next();
        }

        return $this->stash[--$number];
    }
58066
public function multiply($number = null)
    {
        if ($number === null) {
            $this->internalSetOperationModeWithHistory('multiply');
        } elseif ($number instanceof Closure) {
            $this->internalSetOperationModeWithHistory('multiply');
            return $this->group($number);
        } else {
            $this->performOperationOnExpressionEngine('multiply', $number);
        }

        return $this;
    }