/** * 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) { throw new BackendException($e->getMessage(), $e->getCode(), $e); } $collection = $this->createRecordCollection($response); $this->injectSourceIdentifier($collection); return $collection; }
/** * Retrieves a document specified by the ID. * * @param string $recordId The document to retrieve from the Primo API * @param string $inst_code Institution code (optional) * * @throws \Exception * @return string The requested resource */ public function getRecord($recordId, $inst_code = null) { list(, $recordId) = explode('.', $recordId, 2); return parent::getRecord($recordId, $inst_code); }
/** * Retrieves a document specified by the ID. * * @param string $recordId The document to retrieve from the Primo API * @param string $inst_code Institution code (optional) * @param bool $onCampus Whether the user is on campus * * @throws \Exception * @return string The requested resource */ public function getRecord($recordId, $inst_code = null, $onCampus = false) { list(, $recordId) = explode('.', $recordId, 2); return parent::getRecord($recordId, $inst_code, $onCampus); }