Example #1
0
 /**
  * @@inheritdoc
  */
 public function readLine()
 {
     $read = parent::readLine();
     if (!is_null($this->dispatcher) && $this->dispatcher->hasListeners(BeanstalkEvents::STREAM_READ)) {
         $this->dispatcher->dispatch(BeanstalkEvents::STREAM_READ, new StreamReadEvent($read, $this->getTimeStamp()));
     }
     return $read;
 }
 public function reset()
 {
     $this->history = [null];
     parent::__construct(fopen('php://memory', 'w+'));
 }