42 abstract protected function _commit($bytes);
48 abstract protected function _flush();
57 $this->_filters[$key] = $filter;
66 unset($this->_filters[$key]);
76 $this->_writeBuffer .= $bytes;
77 foreach ($this->_filters as $filter)
79 if ($filter->shouldBuffer($this->_writeBuffer))
84 $this->
_doWrite($this->_writeBuffer);
96 $this->
_doWrite($this->_writeBuffer);
108 $this->_mirrors[] = $is;
121 foreach ($this->_mirrors as $k => $stream)
125 if ($this->_writeBuffer !==
'')
127 $stream->write($this->
_filter($this->_writeBuffer));
129 unset($this->_mirrors[$k]);
141 if ($this->_writeBuffer !==
'')
143 $this->
_doWrite($this->_writeBuffer);
147 foreach ($this->_mirrors as $stream)
149 $stream->flushBuffers();
158 foreach ($this->_filters as $filter)
160 $bytes = $filter->filter($bytes);
170 foreach ($this->_mirrors as $stream)
172 $stream->write($bytes);
175 $this->_writeBuffer =
'';