| 1 |
<?php |
| 2 |
|
| 3 |
namespace Depicter\GuzzleHttp\Psr7; |
| 4 |
|
| 5 |
use Depicter\Psr\Http\Message\StreamInterface; |
| 6 |
|
| 7 |
/** |
| 8 |
* Stream decorator that prevents a stream from being seeked. |
| 9 |
* |
| 10 |
* @final |
| 11 |
*/ |
| 12 |
class NoSeekStream implements StreamInterface |
| 13 |
{ |
| 14 |
use StreamDecoratorTrait; |
| 15 |
|
| 16 |
public function seek($offset, $whence = SEEK_SET) |
| 17 |
{ |
| 18 |
throw new \RuntimeException('Cannot seek a NoSeekStream'); |
| 19 |
} |
| 20 |
|
| 21 |
public function isSeekable() |
| 22 |
{ |
| 23 |
return false; |
| 24 |
} |
| 25 |
} |
| 26 |
|