eob()) { $consumed += $iBucket->getLength(); $oBucket->append($iBucket); } unset($iBucket); unset($oBucket); return self::PASS_ON; } /** * Called during instanciation of the filter class object. * * @return bool */ public function onCreate() { return true; } /** * Called upon filter shutdown (typically, this is also during stream * shutdown), and is executed after the flush method is called. * * @return void */ public function onClose() { return; } /** * Set the filter name. * * @param string $name Filter name. * @return string */ public function setName($name) { $old = $this->filtername; $this->filtername = $name; return $old; } /** * Set the filter parameters. * * @param mixed $parameters Filter parameters. * @return mixed */ public function setParameters($parameters) { $old = $this->params; $this->params = $parameters; return $old; } /** * Get the filter name. * * @return string */ public function getName() { return $this->filtername; } /** * Get the filter parameters. * * @return mixed */ public function getParameters() { return $this->params; } /** * Get the stream resource being filtered. * Maybe available only during **filter** calls when the closing parameter * is set to false. * * @return resource */ public function getStream() { return isset($this->stream) ? $this->stream : null; } }