call_ = $call; $this->request_type_ = $request_type; } public function read() { $event = $this->call_->startBatch([ OP_RECV_MESSAGE => true, ]); if ($event->message === null) { return null; } $data = new $this->request_type_; $data->mergeFromString($event->message); return $data; } private $call_; private $request_type_; }