Esempio n. 1
0
 /**
  * Get configuration for the ILS driver.  We will load an .ini file named
  * after the driver class and number if it exists;
  * otherwise we will return an empty array.
  *
  * @param string $source The source id to use for determining the
  * configuration file
  *
  * @return array   The configuration of the driver
  *
  * Circumvent the private declaration in parent class
  */
 public function getDriverConfig($source)
 {
     return parent::getDriverConfig($source);
 }
Esempio n. 2
0
 /**
  * Method to get a fresh MultiBackend Driver.
  *
  * @return mixed A MultiBackend instance.
  */
 protected function getDriver()
 {
     $driver = new MultiBackend($this->getPluginManager(), $this->getMockILSAuthenticator());
     $driver->setConfig(['Drivers' => [], 'Login' => ['drivers' => ['d1', 'd2'], 'default_driver' => 'd1']]);
     $driver->init();
     return $driver;
 }
Esempio n. 3
0
 /**
  * Get configuration for the ILS driver.  We will load an .ini file named
  * after the driver class and number if it exists;
  * otherwise we will return an empty array.
  *
  * @param string $source The source id to use for determining the
  * configuration file
  *
  * @return array   The configuration of the driver
  */
 protected function getDriverConfig($source)
 {
     // Determine config file name based on class name:
     try {
         $config = $this->configLoader->get($this->drivers[$source] . '_' . $source)->toArray();
         if (!empty($config)) {
             return $config;
         }
     } catch (\Zend\Config\Exception\RuntimeException $e) {
         // Fall through
     }
     return parent::getDriverConfig($source);
 }
Esempio n. 4
0
 /**
  * Helper method to determine whether or not a certain method can be
  * called on this driver.  Required method for any smart drivers.
  *
  * @param string $method The name of the called method.
  * @param array  $params Array of passed parameters.
  *
  * @return bool True if the method can be called with the given parameters,
  * false otherwise.
  */
 public function supportsMethod($method, $params)
 {
     if ($method == 'getProlongRegistrationUrl' || $method == 'getPaymentURL') {
         return true;
     }
     return parent::supportsMethod($method, $params);
 }