예제 #1
0
 public function init()
 {
     parent::init();
     if (isset($this->config['Availability']['source'])) {
         $this->availabilitySource = $this->config['Availability']['source'];
     }
     if (isset($this->config['Catalog']['fav_cgi_url'])) {
         $this->favoritesUrl = $this->config['Catalog']['fav_cgi_url'];
     }
     if (isset($this->config['Catalog']['user_cgi_url'])) {
         $this->userCgiUrl = $this->config['Catalog']['user_cgi_url'];
     }
     if (isset($this->config['Catalog']['hmac_key'])) {
         $this->hmacKey = $this->config['Catalog']['hmac_key'];
     }
     if (isset($this->config['Catalog']['wwwuser']) && isset($this->config['Catalog']['wwwpasswd'])) {
         $this->wwwuser = $this->config['Catalog']['wwwuser'];
         $this->wwwpasswd = $this->config['Catalog']['wwwpasswd'];
     }
     if (isset($this->config['Catalog']['payment_url'])) {
         $this->paymentUrl = $this->config['Catalog']['payment_url'];
     }
     if (isset($this->config['Catalog']['prolong_registration_url'])) {
         $this->prolongRegistrationUrl = $this->config['Catalog']['prolong_registration_url'];
     }
     if (isset($this->config['Catalog']['prolong_registration_status'])) {
         $this->prolongRegistrationStatus = $this->config['Catalog']['prolong_registration_status'];
     }
 }
예제 #2
0
 /**
  * Setup Aleph driver using given configuration file
  *
  * @param string $config configuration file to use
  *
  * @throws RuntimeException
  * @return void
  */
 protected function setUpDriver($config)
 {
     $file = realpath(\VUFIND_PHPUNIT_MODULE_PATH . self::FIXTURE_DIRECTORY . 'configs/' . $config);
     if (!$file) {
         throw new RuntimeException(sprintf('Unable to get configuration for driver %s', $config));
     }
     $this->driverConfig = parse_ini_file($file, true);
     $this->driver = new Aleph(new \VuFind\Date\Converter());
     $this->mockedHttpService = $this->getMock('VuFindHttp\\HttpServiceInterface');
     $this->driver->setHttpService($this->mockedHttpService);
     $this->driver->setConfig($this->driverConfig);
     $this->driver->init();
 }