Exception
1 year ago
AppendStream.php
1 year ago
BufferStream.php
1 year ago
CachingStream.php
1 year ago
DroppingStream.php
1 year ago
FnStream.php
1 year ago
Header.php
1 year ago
HttpFactory.php
1 year ago
InflateStream.php
1 year ago
LazyOpenStream.php
1 year ago
LimitStream.php
1 year ago
Message.php
1 year ago
MessageTrait.php
1 year ago
MimeType.php
1 year ago
MultipartStream.php
1 year ago
NoSeekStream.php
1 year ago
PumpStream.php
1 year ago
Query.php
1 year ago
Request.php
1 year ago
Response.php
1 year ago
Rfc7230.php
1 year ago
ServerRequest.php
1 year ago
Stream.php
1 year ago
StreamDecoratorTrait.php
1 year ago
StreamWrapper.php
1 year ago
UploadedFile.php
1 year ago
Uri.php
1 year ago
UriComparator.php
1 year ago
UriNormalizer.php
1 year ago
UriResolver.php
1 year ago
Utils.php
1 year ago
NoSeekStream.php
29 lines
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace SureCartVendors\GuzzleHttp\Psr7; |
| 6 | |
| 7 | use SureCartVendors\Psr\Http\Message\StreamInterface; |
| 8 | |
| 9 | /** |
| 10 | * Stream decorator that prevents a stream from being seeked. |
| 11 | */ |
| 12 | final class NoSeekStream implements StreamInterface |
| 13 | { |
| 14 | use StreamDecoratorTrait; |
| 15 | |
| 16 | /** @var StreamInterface */ |
| 17 | private $stream; |
| 18 | |
| 19 | public function seek($offset, $whence = SEEK_SET): void |
| 20 | { |
| 21 | throw new \RuntimeException('Cannot seek a NoSeekStream'); |
| 22 | } |
| 23 | |
| 24 | public function isSeekable(): bool |
| 25 | { |
| 26 | return false; |
| 27 | } |
| 28 | } |
| 29 |