Skip to content

Commit a64944c

Browse files
committed
Filtered Stream is not seekable
1 parent dafefdb commit a64944c

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

src/Encoding/FilteredStream.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,30 @@ public function __toString()
154154
return $this->getContents();
155155
}
156156

157+
/**
158+
* {@inheritdoc}
159+
*/
160+
public function isSeekable()
161+
{
162+
return false;
163+
}
164+
165+
/**
166+
* {@inheritdoc}
167+
*/
168+
public function rewind()
169+
{
170+
throw new \RuntimeException('Cannot rewind a filtered stream');
171+
}
172+
173+
/**
174+
* {@inheritdoc}
175+
*/
176+
public function seek($offset, $whence = SEEK_SET)
177+
{
178+
throw new \RuntimeException('Cannot seek a filtered stream');
179+
}
180+
157181
/**
158182
* Returns the read filter name.
159183
*

0 commit comments

Comments
 (0)