Example #1
0
 public function next()
 {
     if ($this->iterator->valid()) {
         $value = $this->iterator->current();
         $this->iterator->next();
         return $value;
     } else {
         // Now that the responses are done, check for gRPC status.
         Client::checkError($this->call->getStatus());
         // If no exception is raised, indicate successful end of stream.
         return FALSE;
     }
 }