From a64944c1ffb24608a31adcf9d696cd1dd570c7f4 Mon Sep 17 00:00:00 2001 From: Joel Wurtz Date: Mon, 9 Jul 2018 11:50:13 +0200 Subject: [PATCH] Filtered Stream is not seekable --- src/Encoding/FilteredStream.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/Encoding/FilteredStream.php b/src/Encoding/FilteredStream.php index 4b296ed..ffe76d7 100644 --- a/src/Encoding/FilteredStream.php +++ b/src/Encoding/FilteredStream.php @@ -154,6 +154,30 @@ public function __toString() return $this->getContents(); } + /** + * {@inheritdoc} + */ + public function isSeekable() + { + return false; + } + + /** + * {@inheritdoc} + */ + public function rewind() + { + throw new \RuntimeException('Cannot rewind a filtered stream'); + } + + /** + * {@inheritdoc} + */ + public function seek($offset, $whence = SEEK_SET) + { + throw new \RuntimeException('Cannot seek a filtered stream'); + } + /** * Returns the read filter name. *