diff --git a/module/VuFind/src/VuFind/ILS/Driver/KohaILSDI.php b/module/VuFind/src/VuFind/ILS/Driver/KohaILSDI.php index cc248b03850dae4d5edf74e9a70b9750dbace259..1f8895cebfe3ef09c66a89ac7d99feac07c51178 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/KohaILSDI.php +++ b/module/VuFind/src/VuFind/ILS/Driver/KohaILSDI.php @@ -29,7 +29,6 @@ namespace VuFind\ILS\Driver; use PDO, PDOException; use VuFind\Exception\ILS as ILSException; -use VuFindHttp\HttpServiceInterface; use Zend\Log\LoggerInterface; use VuFind\Exception\Date as DateException; @@ -48,6 +47,9 @@ use VuFind\Exception\Date as DateException; class KohaILSDI extends \VuFind\ILS\Driver\AbstractBase implements \VuFindHttp\HttpServiceAwareInterface, \Zend\Log\LoggerAwareInterface { + use \VuFindHttp\HttpServiceAwareTrait; + use \VuFind\Log\LoggerAwareTrait; + /** * Web services host * @@ -107,57 +109,22 @@ class KohaILSDI extends \VuFind\ILS\Driver\AbstractBase implements protected $logger = false; /** - * Set the logger - * - * @param LoggerInterface $logger Logger to use. - * - * @return void - */ - public function setLogger(LoggerInterface $logger) - { - $this->logger = $logger; - } - - /** - * Show a debug message. - * - * @param string $msg Debug message. - * - * @return void - */ - protected function debug($msg) - { - if ($this->logger) { - $this->logger->debug($msg); - } - } - - /** - * HTTP service + * Date converter object * - * @var \VuFindHttp\HttpServiceInterface + * @var \VuFind\Date\Converter */ - protected $httpService = null; + protected $dateConverter; /** - * Set the HTTP service to be used for HTTP requests. - * - * @param HttpServiceInterface $service HTTP service + * Constructor * - * @return void + * @param \VuFind\Date\Converter $dateConverter Date converter object */ - public function setHttpService(HttpServiceInterface $service) + public function __construct(\VuFind\Date\Converter $dateConverter) { - $this->httpService = $service; + $this->dateConverter = $dateConverter; } - /** - * Date converter object - * - * @var \VuFind\Date\Converter - */ - protected $dateConverter; - /** * Initialize the driver. * @@ -195,9 +162,6 @@ class KohaILSDI extends \VuFind\ILS\Driver\AbstractBase implements = isset($this->config['Other']['availableLocations']) ? $this->config['Other']['availableLocations'] : []; - // Create a dateConverter - $this->dateConverter = new \VuFind\Date\Converter; - $this->debug("Config Summary:"); $this->debug("DB Host: " . $this->host); $this->debug("ILS URL: " . $this->ilsBaseUrl);