You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yanzong/vendor/guzzlehttp/psr7/src/NoSeekStream.php

28 lines
524 B

<?php
declare(strict_types=1);
namespace GuzzleHttp\Psr7;
use Psr\Http\Message\StreamInterface;
/**
* Stream decorator that prevents a stream from being seeked.
*/
final class NoSeekStream implements StreamInterface
{
use StreamDecoratorTrait;
/** @var StreamInterface */
private $stream;
public function seek($offset, $whence = SEEK_SET): void
{
throw new \RuntimeException('Cannot seek a NoSeekStream');
}
public function isSeekable(): bool
{
return false;
}
}