krz/vox-populi

A Tumblr web client.

clone: git clone https://gitbay.org/krz/vox-populi.git

main: vendor/guzzlehttp/psr7/src/NoSeekStream.php · raw

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