aboutsummaryrefslogtreecommitdiff
path: root/vendor/guzzlehttp/psr7/src/NoSeekStream.php
diff options
context:
space:
mode:
authorChristian Cleberg <hello@cleberg.net>2023-05-22 15:37:34 -0500
committerChristian Cleberg <hello@cleberg.net>2023-05-22 15:37:34 -0500
commit17ff8aec3a0d2e0a520849c42c40a154a0831495 (patch)
tree8860d29e9d0f9acd1535c7827045864fc31f8d01 /vendor/guzzlehttp/psr7/src/NoSeekStream.php
downloadmichelangelo-17ff8aec3a0d2e0a520849c42c40a154a0831495.tar.gz
michelangelo-17ff8aec3a0d2e0a520849c42c40a154a0831495.tar.bz2
michelangelo-17ff8aec3a0d2e0a520849c42c40a154a0831495.zip
initial commit
Diffstat (limited to 'vendor/guzzlehttp/psr7/src/NoSeekStream.php')
-rw-r--r--vendor/guzzlehttp/psr7/src/NoSeekStream.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/vendor/guzzlehttp/psr7/src/NoSeekStream.php b/vendor/guzzlehttp/psr7/src/NoSeekStream.php
new file mode 100644
index 0000000..2332218
--- /dev/null
+++ b/vendor/guzzlehttp/psr7/src/NoSeekStream.php
@@ -0,0 +1,22 @@
+<?php
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\StreamInterface;
+
+/**
+ * Stream decorator that prevents a stream from being seeked
+ */
+class NoSeekStream implements StreamInterface
+{
+ use StreamDecoratorTrait;
+
+ public function seek($offset, $whence = SEEK_SET)
+ {
+ throw new \RuntimeException('Cannot seek a NoSeekStream');
+ }
+
+ public function isSeekable()
+ {
+ return false;
+ }
+}