/** * Flush the internal buffer to the delegated writer */ private function flush() { foreach ($this->queue as $item) { $this->delegate->writeItem($item); } if ($this->delegate instanceof FlushableWriter) { $this->delegate->flush(); } }
/** * {@inheritdoc} */ public function process($item, callable $next) { $this->writer->writeItem($item); return $next($item); }