/** * Retrieve a single document. * * @param string $id Document identifier * @param ParamBag $params Search backend parameters * * @return RecordCollectionInterface */ public function retrieve($id, ParamBag $params = null) { try { $response = $this->connector->getRecord($id, $this->connector->getInstitutionCode()); } catch (\Exception $e) { // TODO: check from database, this could be in a favorite list throw new BackendException($e->getMessage(), $e->getCode(), $e); } $response['id'] = $id; $collection = $this->createRecordCollection(['documents' => [$response]]); return $collection; }