示例#1
0
文件: Backend.php 项目: tillk/vufind
 /**
  * Retrieve a single document.
  *
  * @param string   $id     Document identifier
  * @param ParamBag $params Search backend parameters
  *
  * @return RecordCollectionInterface
  */
 public function retrieve($id, ParamBag $params = null)
 {
     $response = $this->connector->getRecord($id, $params);
     $collection = $this->createRecordCollection($response);
     $this->injectSourceIdentifier($collection);
     return $collection;
 }
示例#2
0
 /**
  * Create the EIT connector.
  *
  * @return Connector
  */
 protected function createConnector()
 {
     $prof = isset($this->config->General->prof) ? $this->config->General->prof : null;
     $pwd = isset($this->config->General->pwd) ? $this->config->General->pwd : null;
     $base = "http://eit.ebscohost.com/Services/SearchService.asmx/Search";
     $dbs = isset($this->config->General->dbs) ? $this->config->General->dbs : null;
     $connector = new Connector($base, $this->serviceLocator->get('VuFind\\Http')->createClient(), $prof, $pwd, $dbs);
     $connector->setLogger($this->logger);
     return $connector;
 }