source: vendor/guzzlehttp/psr7/src/NoSeekStream.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 7 days ago

Upload project files

  • Property mode set to 100644
File size: 524 bytes
Line 
1<?php
2
3declare(strict_types=1);
4
5namespace GuzzleHttp\Psr7;
6
7use Psr\Http\Message\StreamInterface;
8
9/**
10 * Stream decorator that prevents a stream from being seeked.
11 */
12final 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}
Note: See TracBrowser for help on using the repository browser.