Lines Matching refs:limit
20 private $limit; variable in GuzzleHttp\\Psr7\\LimitStream
27 * @param int $limit Total number of bytes to allow to be read
34 int $limit = -1, argument
38 $this->setLimit($limit);
50 if ($this->limit === -1) {
54 return $this->stream->tell() >= $this->offset + $this->limit;
64 } elseif ($this->limit === -1) {
67 return min($this->limit, $length - $this->offset);
86 if ($this->limit !== -1) {
87 if ($offset > $this->offset + $this->limit) {
88 $offset = $this->offset + $this->limit;
132 * @param int $limit Number of bytes to allow to be read from the stream.
135 public function setLimit(int $limit): void argument
137 $this->limit = $limit;
142 if ($this->limit === -1) {
148 $remaining = ($this->offset + $this->limit) - $this->stream->tell();