/** * Gets the source of a single document * * @param string $index * @param string $type * @param string $id * @return array|object * @throws \Elastification\Client\Exception\RequestException * @throws \Elastification\Client\Exception\ResponseException */ protected function getDocument($index, $type, $id) { $getDocumentRequest = new GetDocumentRequest($index, $type, $this->serializer); $getDocumentRequest->setId($id); /** @var DocumentResponse $response */ $response = $this->client->send($getDocumentRequest); return $response->getSource(); }
/** * @inheritdoc */ public function getRequest($name) { return $this->client->getRequest($name); }