Partition the limit by header
@return Chainable builder
969226
public ServletLimiterBuilder partitionByHeader(String name) {
        return partitionResolver(request -> Optional.ofNullable(request.getHeader(name)).orElse(null));
    }
1181065
public function limit(int $start, int $howMuch): Select
    {
        $this->limit = new \stdClass;
        $this->limit->start = $start;
        $this->limit->howMuch = $howMuch;
        return $this;
    }
321656
protected function generateAndAttachLinkHeaders(Response $response, $limit = null)
    {
        $headers = $this->fetchLinkableNodes($response)
            ->flatten(1)
            ->map(function ($url) {
                return $this->buildLinkHeaderString($url);
            })
            ->filter()
            ->unique()
            ->take($limit)
            ->implode(',');

        if (!empty(trim($headers))) {
            $this->addLinkHeader($response, $headers);
        }

        return $this;
    }
155985
protected function _setLimit()
    {
        if (
            is_null($this->_sql->getLimit()) ||
            intval($this->_sql->getLimit()) < 1
        ) {
            return $this;
        }

        if ($this->_sql->getOffset() > 0) {
            return $this->_setLimitWithOffset();
        }
        return  $this->_setSimpleLimit();
    }
1287118
public function limit($limit, $offset = null)
    {
        if ($offset) {
            $this->getLimit()->setParams(array($limit, $offset));
        } else {
            $this->getLimit()->setParams(array($limit));
        }

        return $this;
    }
820300
public function setMultiple(array $headers): HeaderCollection
    {
        foreach ($headers as $key => $value) {
            $key = $this->getKey($key, true);
            $this->headers[$key] = $value;
        }
        return $this;
    }
437447
public function build()
    {
        $headers = array();
        foreach (get_object_vars($this) as $header => $value) {
            $headers[] = $header . ": " . (string)$value;
        }
        return $headers;
    }
763670
public function multiple($limit = null)
	{
		$this->attribute('infinite', true)
			->isMultiple = true;

		if ($limit !== null) {
			$this->setMultipleLimit($limit);
		}

		return $this;
	}
875543
public function limits($limits = NULL) {
        if (isset($limits)) {
            if (is_int($limits)) {
                $this->setLimits($limits);
                return $this;
            }
        }
        return $this->getLimits();
    }
1302362
function setLimit($limit) {
		if (null !== $limit) {
			$limit = (int) $limit;
		}
		$this->limit = $limit;
		return $this;
	}
327745
public function createHeader()
    {
        $this->childNodes->prepend(new Card\Header());

        return $this->header = $this->childNodes->first();
    }
567856
public function Limit(int $lower, int $upper = null): QueryBuilder
    {
        $this->limit['lower'] = (int) $lower;
        
        if (isset($upper)) {
            $this->limit['upper'] = (int) $upper;
        }
        
        return $this;
    }
1119185
protected function sendHeaders()
    {
        $headers = $this->getHeaders();

        foreach ($headers as $header) {
            header($header);
        }
        return $this;
    }
264675
protected function restrict()
	{
		$length = strlen($this->data);

		if ($length > 0)
		{
			$this->data[$length - 1] = chr(ord($this->data[$length - 1]) & self::$restrict[$this->size % 8]);
		}

		return $this;
	}
915104
public function build()
    {
        # Fixed Header
        # Control Packet Type
        $cmd = $this->getMessageType() << 4;

        $cmd |= ($this->reserved_flags & 0x0F);

        $header = chr($cmd) . $this->remaining_length_bytes;

        $header .= $this->buildVariableHeader();

        return $header;
    }
699782
private function buildLimit() {
        $this->getCriteria()->limit($this->getIndexCriteria()->getLimit(), $this->getIndexCriteria()->getOffset());
    }
1135248
public function getHeaderPartFactory()
    {
        if ($this->headerPartFactory === null) {
            $this->headerPartFactory = new HeaderPartFactory($this->getCharsetConverter());
        }
        return $this->headerPartFactory;
    }