public function LimitStream::getSize in Auth0 Single Sign On 8.2
Returns the size of the limited subset of data
Overrides StreamDecoratorTrait::getSize
File
- vendor/
guzzlehttp/ psr7/ src/ LimitStream.php, line 56
Class
- LimitStream
- Decorator used to return only a subset of a stream
Namespace
GuzzleHttp\Psr7Code
public function getSize() {
if (null === ($length = $this->stream
->getSize())) {
return null;
}
elseif ($this->limit == -1) {
return $length - $this->offset;
}
else {
return min($this->limit, $length - $this->offset);
}
}