45 abstract protected function _commit($bytes);
50 abstract protected function _flush();
60 $this->_filters[$key] = $filter;
70 unset($this->_filters[$key]);
84 $this->_writeBuffer .= $bytes;
85 foreach ($this->_filters as $filter) {
86 if ($filter->shouldBuffer($this->_writeBuffer)) {
90 $this->
_doWrite($this->_writeBuffer);
103 $this->
_doWrite($this->_writeBuffer);
116 $this->_mirrors[] = $is;
130 foreach ($this->_mirrors as $k => $stream) {
131 if ($is === $stream) {
132 if ($this->_writeBuffer !==
'') {
133 $stream->write($this->_writeBuffer);
135 unset($this->_mirrors[$k]);
148 if ($this->_writeBuffer !==
'') {
149 $this->
_doWrite($this->_writeBuffer);
153 foreach ($this->_mirrors as $stream) {
154 $stream->flushBuffers();
161 foreach ($this->_filters as $filter) {
162 $bytes = $filter->filter($bytes);
173 foreach ($this->_mirrors as $stream) {
174 $stream->write($bytes);
177 $this->_writeBuffer =
'';