/**
  * {@inheritdoc}
  */
 public function readNext()
 {
     if (!$this->iterator->valid()) {
         return null;
     }
     $request = $this->iterator->current();
     $json = $request->json();
     $this->json = $json;
     return $this->extract($json);
 }
 /**
  * {@inheritdoc}
  */
 public function readNext()
 {
     if (!$this->iterator->valid()) {
         return null;
     }
     $resonse = $this->iterator->current();
     $json = $resonse->json();
     if (!isset($json['data'])) {
         return null;
     }
     $response = $json['data'];
     $entry = new MapReduceEntry();
     $phase = isset($json['phase']) ? $json['phase'] : 0;
     $entry->phase = $phase;
     $entry->response = $response;
     return $entry;
 }