コード例 #1
0
ファイル: Result.php プロジェクト: fresnostate-library/xerxes
 /**
  * Constructor
  * 
  * @param Record $record
  * @param Config $config
  */
 public function __construct(Record $record, Config $config)
 {
     $this->xerxes_record = $record;
     $this->registry = Registry::getInstance();
     $this->config = $config;
     // link resolver stuff
     $this->link_resolver = $this->config->getConfig("LINK_RESOLVER_ADDRESS", false, $this->registry->getConfig("LINK_RESOLVER_ADDRESS", false));
     $this->sid = $this->config->getConfig("APPLICATION_SID", false, $this->registry->getConfig("APPLICATION_SID", false, "calstate.edu:xerxes"));
     if ($this->link_resolver != null) {
         $this->url_open = $record->getOpenURL($this->link_resolver, $this->sid);
     }
     $this->openurl_kev_co = $record->getOpenURL(null, $this->sid);
     // holdings
     $this->holdings = new Holdings();
     if ($record->hasPhysicalHoldings() == false) {
         $this->holdings->checked = true;
     }
     // proxy links?
     $proxy_server = $this->registry->getConfig('PROXY_SERVER', false);
     $should_proxy_links = $this->config->getConfig('SHOULD_PROXY', false, false);
     if ($should_proxy_links) {
         foreach ($this->xerxes_record->getLinks() as $link) {
             $link->addProxyPrefix($proxy_server);
         }
     }
 }
コード例 #2
0
ファイル: Google.php プロジェクト: fresnostate-library/xerxes
 /**
  * URL for the full record display, taken from the record
  * 
  * @param Record $record
  * @return string url
  */
 public function linkFullRecord(Record $record)
 {
     $links = $record->getLinks();
     $link = $links[0];
     return $link->getUrl();
 }