Beispiel #1
0
 /**
  * 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);
         }
     }
 }
Beispiel #2
0
 /**
  * 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();
 }