diff options
Diffstat (limited to 'vendor/ringcentral/psr7/src/NoSeekStream.php')
-rw-r--r-- | vendor/ringcentral/psr7/src/NoSeekStream.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/vendor/ringcentral/psr7/src/NoSeekStream.php b/vendor/ringcentral/psr7/src/NoSeekStream.php new file mode 100644 index 0000000..328fdda --- /dev/null +++ b/vendor/ringcentral/psr7/src/NoSeekStream.php @@ -0,0 +1,21 @@ +<?php +namespace RingCentral\Psr7; + +use Psr\Http\Message\StreamInterface; + +/** + * Stream decorator that prevents a stream from being seeked + */ +class NoSeekStream extends StreamDecoratorTrait implements StreamInterface +{ + + public function seek($offset, $whence = SEEK_SET) + { + throw new \RuntimeException('Cannot seek a NoSeekStream'); + } + + public function isSeekable() + { + return false; + } +} |