Example #1
0
 /**
  * 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();
     }
 }
Example #2
0
 /**
  * {@inheritdoc}
  */
 public function process($item, callable $next)
 {
     $this->writer->writeItem($item);
     return $next($item);
 }