/** * Constructor * * @param Xerxes_Record $record record * @param Config $config local 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); } } }
/** * Constructor * * @param Xerxes_Record $record record * @param Config $config local 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->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; } }