From d0c98c346d5e56402254c527d217bea244991b58 Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Wed, 22 May 2013 10:38:26 -0400 Subject: [PATCH] Simplified Summon code to use native functionality. --- .../Search/Factory/SummonBackendFactory.php | 2 +- .../VuFindSearch/Backend/Summon/Backend.php | 1 + .../VuFindSearch/Backend/Summon/Connector.php | 76 ------------------- 3 files changed, 2 insertions(+), 77 deletions(-) delete mode 100644 module/VuFindSearch/src/VuFindSearch/Backend/Summon/Connector.php diff --git a/module/VuFind/src/VuFind/Search/Factory/SummonBackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/SummonBackendFactory.php index 42e4a7ae512..7c822e7478c 100644 --- a/module/VuFind/src/VuFind/Search/Factory/SummonBackendFactory.php +++ b/module/VuFind/src/VuFind/Search/Factory/SummonBackendFactory.php @@ -29,10 +29,10 @@ namespace VuFind\Search\Factory; +use SerialsSolutions\Summon\Zend2 as Connector; use VuFindSearch\Backend\BackendInterface; use VuFindSearch\Backend\Summon\Response\RecordCollectionFactory; use VuFindSearch\Backend\Summon\QueryBuilder; -use VuFindSearch\Backend\Summon\Connector; use VuFindSearch\Backend\Summon\Backend; use Zend\ServiceManager\ServiceLocatorInterface; diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Summon/Backend.php b/module/VuFindSearch/src/VuFindSearch/Backend/Summon/Backend.php index 29158fd537d..c4040039cc0 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/Summon/Backend.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/Summon/Backend.php @@ -29,6 +29,7 @@ namespace VuFindSearch\Backend\Summon; +use SerialsSolutions\Summon\Zend2 as Connector; use SerialsSolutions_Summon_Query as SummonQuery; use VuFindSearch\Query\AbstractQuery; diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Summon/Connector.php b/module/VuFindSearch/src/VuFindSearch/Backend/Summon/Connector.php deleted file mode 100644 index 22db2faac6d..00000000000 --- a/module/VuFindSearch/src/VuFindSearch/Backend/Summon/Connector.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php -/** - * Summon Search API Interface (VuFind implementation) - * - * PHP version 5 - * - * Copyright (C) Andrew Nagy 2009. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * @category VuFind2 - * @package Summon - * @author Andrew S. Nagy <vufind-tech@lists.sourceforge.net> - * @author Demian Katz <demian.katz@villanova.edu> - * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License - * @link http://api.summon.serialssolutions.com/help/api/ API Documentation - */ -namespace VuFindSearch\Backend\Summon; -use SerialsSolutions\Summon\Zend2 as BaseSummon, Zend\Log\LoggerInterface; - -/** - * Summon Search API Interface (VuFind implementation) - * - * @category VuFind2 - * @package Summon - * @author Andrew S. Nagy <vufind-tech@lists.sourceforge.net> - * @author Demian Katz <demian.katz@villanova.edu> - * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License - * @link http://api.summon.serialssolutions.com/help/api/ API Documentation - */ -class Connector extends BaseSummon implements \Zend\Log\LoggerAwareInterface -{ - /** - * Logger object for debug info (or false for no debugging). - * - * @var LoggerInterface|bool - */ - protected $logger = false; - - /** - * Set the logger - * - * @param LoggerInterface $logger Logger to use. - * - * @return void - */ - public function setLogger(LoggerInterface $logger) - { - $this->logger = $logger; - } - - /** - * Print a message if debug is enabled. - * - * @param string $msg Message to print - * - * @return void - */ - protected function debugPrint($msg) - { - if ($this->logger) { - $this->logger->debug("$msg\n"); - } - } -} -- GitLab