Exemple #1
0
 /**
  * Initialize the driver.
  *
  * Validate configuration and perform all resource-intensive tasks needed to
  * make the driver active.
  *
  * @throws ILSException
  * @return void
  */
 public function init()
 {
     parent::init();
     $this->catalogHost = $this->config['Catalog']['Host'];
     $this->renewalsScript = $this->config['Catalog']['renewalsScript'];
     $this->dbsid = isset($this->config['Catalog']['DB']) ? $this->config['Catalog']['DB'] : 1;
 }
Exemple #2
0
 /**
  * Constructor
  *
  * @access public
  */
 public function init()
 {
     parent::init();
     if (!isset($this->config['Catalog']['URL'])) {
         throw new ILSException('Catalog/URL configuration needs to be set.');
     }
     if (!(isset($this->config['PAIA']['URL']) || isset($this->config['Catalog']['loanURL']))) {
         throw new ILSException('Catalog/loanURL or PAIA/URL configuration needs to be set.');
     }
     $this->catalogURL = $this->config['Catalog']['URL'];
     $this->loanURL = $this->config['Catalog']['loanURL'];
     $this->opacfno = $this->config['Catalog']['opacfno'];
     $this->paiaURL = $this->config['PAIA']['URL'];
 }
Exemple #3
0
 /**
  * Initialize the driver.
  *
  * Validate configuration and perform all resource-intensive tasks needed to
  * make the driver active.
  *
  * @throws ILSException
  * @return void
  */
 public function init()
 {
     parent::init();
     // initialize DAIA parent
     if (isset($this->config['Catalog']['opaciln'])) {
         $this->opaciln = $this->config['Catalog']['opaciln'];
     }
     if (isset($this->config['Catalog']['opacfno'])) {
         $this->opacfno = $this->config['Catalog']['opacfno'];
     }
     if (isset($this->config['Catalog']['opcloan'])) {
         $this->opcloan = $this->config['Catalog']['opcloan'];
     }
     if (isset($this->config['Catalog']['database'])) {
         putenv("SYBASE=" . $this->config['Catalog']['sybpath']);
         $this->db = sybase_connect($this->config['Catalog']['sybase'], $this->config['Catalog']['username'], $this->config['Catalog']['password']);
         sybase_select_db($this->config['Catalog']['database']);
     } else {
         throw new ILSException('No Database.');
     }
 }
Exemple #4
0
 /**
  * Initialize the driver.
  *
  * Validate configuration and perform all resource-intensive tasks needed to
  * make the driver active.
  *
  * @throws ILSException
  * @return void
  */
 public function init()
 {
     parent::init();
     if (!isset($this->config['PAIA']['baseUrl'])) {
         throw new ILSException('PAIA/baseUrl configuration needs to be set.');
     }
     $this->paiaURL = $this->config['PAIA']['baseUrl'];
     // use PAIA specific timeout setting for http requests if configured
     if (isset($this->config['PAIA']['timeout'])) {
         $this->paiaTimeout = $this->config['PAIA']['timeout'];
     }
     // do we have caching enabled for PAIA
     if (isset($this->config['PAIA']['paiaCache'])) {
         $this->paiaCacheEnabled = $this->config['PAIA']['paiaCache'];
     } else {
         $this->debug('Caching not enabled, disabling it by default.');
     }
 }