Failed Version

This commit is contained in:
Enoch
2024-08-09 17:43:48 +08:00
parent 6915f4d76e
commit be0892c1fe
223 changed files with 37369 additions and 38 deletions
+22
View File
@@ -0,0 +1,22 @@
<?php
namespace Workerman\Psr7;
use Psr\Http\Message\StreamInterface;
/**
* Stream decorator that prevents a stream from being seeked
*/
class NoSeekStream implements StreamInterface
{
use StreamDecoratorTrait;
public function seek(int $offset, int $whence = SEEK_SET): void
{
throw new \RuntimeException('Cannot seek a NoSeekStream');
}
public function isSeekable(): bool
{
return false;
}
}