Subversion Repositories cheapmusic

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
103 - 1
<?php
2
namespace GuzzleHttp\Psr7;
3
 
4
use Psr\Http\Message\StreamInterface;
5
 
6
/**
7
 * Stream decorator that prevents a stream from being seeked
8
 */
9
class 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
}