19 rewind as
private doRewind;
20 seek as
private doSeek;
63 if (
null !== $readFilterOptions) {
64 $this->readFilterCallback = Filter\fun($this->
readFilter(), $readFilterOptions);
66 $this->readFilterCallback = Filter\fun($this->
readFilter());
69 if (
null !== $writeFilterOptions) {
70 $this->writeFilterCallback = Filter\fun($this->
writeFilter(), $writeFilterOptions);
72 @trigger_error(
'The $writeFilterOptions argument is deprecated since version 1.5 and will be removed in 2.0.', E_USER_DEPRECATED);
74 $this->writeFilterCallback = Filter\fun($this->
writeFilter());
77 $this->stream = $stream;
83 public function read($length)
85 if (strlen($this->buffer) >= $length) {
86 $read = substr($this->buffer, 0, $length);
87 $this->buffer = substr($this->buffer, $length);
92 if ($this->stream->eof()) {
103 return $read.$this->read($length - strlen($read));
109 public function eof()
121 protected function fill()
126 if ($this->stream->eof()) {
138 while (!$this->
eof()) {
139 $buf = $this->
read(self::BUFFER_SIZE);
182 @trigger_error(
'Filtered streams are not seekable. This method will start raising an exception in the next major version', E_USER_DEPRECATED);
189 public function seek($offset, $whence = SEEK_SET)
191 @trigger_error(
'Filtered streams are not seekable. This method will start raising an exception in the next major version', E_USER_DEPRECATED);
192 $this->doSeek($offset, $whence);
204 @trigger_error(
'The '.__CLASS__.
'::'.__METHOD__.
' method is deprecated since version 1.5 and will be removed in 2.0.', E_USER_DEPRECATED);
225 @trigger_error(
'The '.__CLASS__.
'::'.__METHOD__.
' method is deprecated since version 1.5 and will be removed in 2.0.', E_USER_DEPRECATED);