diff --git a/module/VuFind/src/VuFind/Bootstrap.php b/module/VuFind/src/VuFind/Bootstrap.php index 6c23596a2d367de7c4e6b1d5c0209e7cd0c64e0a..da47ab9ef6700c69ca44733554a5542a2741c102 100644 --- a/module/VuFind/src/VuFind/Bootstrap.php +++ b/module/VuFind/src/VuFind/Bootstrap.php @@ -309,7 +309,7 @@ class Bootstrap // Get session configuration: if (!isset($this->config->Session->type)) { - throw new Exception('Cannot initialize session; configuration missing'); + throw new \Exception('Cannot initialize session; configuration missing'); } // Register a session manager: diff --git a/module/VuFind/src/VuFind/Cache/Manager.php b/module/VuFind/src/VuFind/Cache/Manager.php index c6cc1f19540ac03e259d2c7401c41d97ff178cd3..04281c7cd873b8ba3ea36437ec3c3fdacab4fac0 100644 --- a/module/VuFind/src/VuFind/Cache/Manager.php +++ b/module/VuFind/src/VuFind/Cache/Manager.php @@ -92,7 +92,7 @@ class Manager { if (!isset($this->caches[$key])) { if (!isset($this->cacheSettings[$key])) { - throw new Exception('Requested unknown cache: ' . $key); + throw new \Exception('Requested unknown cache: ' . $key); } $this->caches[$key] = StorageFactory::factory( $this->cacheSettings[$key] diff --git a/module/VuFind/src/VuFind/Config/Writer.php b/module/VuFind/src/VuFind/Config/Writer.php index daf0e83e1f46745b53a9f550df424877a27aab47..572d1c3c1e7fd468c2199bf50a202408c3864c1c 100644 --- a/module/VuFind/src/VuFind/Config/Writer.php +++ b/module/VuFind/src/VuFind/Config/Writer.php @@ -52,7 +52,7 @@ class VF_Config_Writer $this->filename = $filename; $this->content = file_get_contents($filename); if (!$this->content) { - throw new Exception('Could not read ' . $filename); + throw new \Exception('Could not read ' . $filename); } } diff --git a/module/VuFind/src/VuFind/Connection/Oracle.php b/module/VuFind/src/VuFind/Connection/Oracle.php index 929188bf6282893a1022024790d8bcb5e877dc12..3029ade46ab7af79a17f09d3403d51975ce39040 100644 --- a/module/VuFind/src/VuFind/Connection/Oracle.php +++ b/module/VuFind/src/VuFind/Connection/Oracle.php @@ -65,7 +65,7 @@ class Oracle } else { error_reporting($tmp); $this->handleError('connect', oci_error()); - throw new Exception('Oracle connection problem.'); + throw new \Exception('Oracle connection problem.'); } } diff --git a/module/VuFind/src/VuFind/Connection/SRU.php b/module/VuFind/src/VuFind/Connection/SRU.php index c8030f2f6e82e2e40c30f260f5c9da8fd2698dca..311b66c38a539d7d0018afe414bbe9e8bb316277 100644 --- a/module/VuFind/src/VuFind/Connection/SRU.php +++ b/module/VuFind/src/VuFind/Connection/SRU.php @@ -265,7 +265,7 @@ class SRU public function checkForHttpError($result) { if (!$result->isSuccess()) { - throw new Exception('HTTP error ' . $result->getStatus()); + throw new \Exception('HTTP error ' . $result->getStatus()); } } @@ -323,7 +323,7 @@ class SRU protected function process($result) { if (substr($result, 0, 5) != '<?xml') { - throw new Exception('Cannot Load Results'); + throw new \Exception('Cannot Load Results'); } // Send back either the raw XML or a SimpleXML object, as requested: diff --git a/module/VuFind/src/VuFind/Connection/SolrReserves.php b/module/VuFind/src/VuFind/Connection/SolrReserves.php index 4128006fb2044a91dc6042ecdad13f21e71c2d6e..da1f689357787cd2fc9c7a8183238baeef9c6565 100644 --- a/module/VuFind/src/VuFind/Connection/SolrReserves.php +++ b/module/VuFind/src/VuFind/Connection/SolrReserves.php @@ -84,7 +84,7 @@ class SolrReserves extends Solr if (!isset($record['INSTRUCTOR_ID']) || !isset($record['COURSE_ID']) || !isset($record['DEPARTMENT_ID']) ) { - throw new Exception( + throw new \Exception( 'INSTRUCTOR_ID and/or COURSE_ID and/or DEPARTMENT_ID fields ' . 'not present in reserve records. Please update ILS driver.' ); diff --git a/module/VuFind/src/VuFind/Search/Base/Params.php b/module/VuFind/src/VuFind/Search/Base/Params.php index 6c2f61a3ecd7383d8b32175e2a80caaecb1f41a6..e5b284cdb5e2d117e4a98415a1917b092df013c0 100644 --- a/module/VuFind/src/VuFind/Search/Base/Params.php +++ b/module/VuFind/src/VuFind/Search/Base/Params.php @@ -116,7 +116,7 @@ class Params // Proxy undefined methods to the options object: $method = array($this->options, $methodName); if (!is_callable($method)) { - throw new Exception($methodName . ' cannot be called.'); + throw new \Exception($methodName . ' cannot be called.'); } return call_user_func_array($method, $params); } @@ -270,7 +270,7 @@ class Params // to great lengths for compatibility. if (is_array($lookfor)) { if (count($lookfor) > 1) { - throw new Exception("Unsupported search URL."); + throw new \Exception("Unsupported search URL."); } $lookfor = $lookfor[0]; } @@ -788,7 +788,7 @@ class Params $obj->init($this, $request); $this->recommend[$location][] = $obj; } else { - throw new Exception( + throw new \Exception( 'Could not load recommendation module: ' . $class ); } @@ -1435,7 +1435,7 @@ class Params public function setQueryIDs($ids) { // This needs to be defined in child classes: - throw new Exception(get_class($this) . ' does not support setQueryIDs().'); + throw new \Exception(get_class($this) . ' does not support setQueryIDs().'); } /** diff --git a/module/VuFind/src/VuFind/Search/Base/Results.php b/module/VuFind/src/VuFind/Search/Base/Results.php index 3e842f76ce6367fa83c8011a27b44161a5b4eb37..8927e5563292f1616a965d88b46597e6346452d7 100644 --- a/module/VuFind/src/VuFind/Search/Base/Results.php +++ b/module/VuFind/src/VuFind/Search/Base/Results.php @@ -155,7 +155,7 @@ abstract class Results public static function getRecord($id) { // This needs to be defined in subclasses: - throw new Exception('getRecord needs to be defined.'); + throw new \Exception('getRecord needs to be defined.'); } /** @@ -195,7 +195,7 @@ abstract class Results // Proxy undefined methods to the parameter object: $method = array($this->params, $methodName); if (!is_callable($method)) { - throw new Exception($methodName . ' cannot be called.'); + throw new \Exception($methodName . ' cannot be called.'); } return call_user_func_array($method, $params); } @@ -303,7 +303,7 @@ abstract class Results // is called... blow up if somebody tries to get data that is not yet // available. if (is_null($this->savedSearch)) { - throw new Exception( + throw new \Exception( 'Cannot retrieve save status before updateSaveStatus is called.' ); } diff --git a/module/VuFind/src/VuFind/Search/Empty/Results.php b/module/VuFind/src/VuFind/Search/Empty/Results.php index 2dc46a2dba21a162dee6bdc74a780b079094fcb2..8068e905ef3f1f48a696b07f91be2aec9aac5a21 100644 --- a/module/VuFind/src/VuFind/Search/Empty/Results.php +++ b/module/VuFind/src/VuFind/Search/Empty/Results.php @@ -25,6 +25,8 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://www.vufind.org Main Page */ +namespace VuFind\Search\Empty; +use VuFind\Search\Base\Results as BaseResults; /** * Simple search results object to represent an empty set (used when dealing with @@ -36,7 +38,7 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://www.vufind.org Main Page */ -class VF_Search_Empty_Results extends VF_Search_Base_Results +class Results extends BaseResults { /** * Support method for constructor -- perform a search based on the parameters @@ -72,6 +74,6 @@ class VF_Search_Empty_Results extends VF_Search_Base_Results */ public static function getRecord($id) { - throw new Exception('Cannot get record from empty set.'); + throw new \Exception('Cannot get record from empty set.'); } } \ No newline at end of file diff --git a/module/VuFind/src/VuFind/Search/Favorites/Options.php b/module/VuFind/src/VuFind/Search/Favorites/Options.php index cd166fa7261a4e482deb6840864738115875765a..59743349ed5705e4540d52b50ca3544221b46cba 100644 --- a/module/VuFind/src/VuFind/Search/Favorites/Options.php +++ b/module/VuFind/src/VuFind/Search/Favorites/Options.php @@ -25,7 +25,9 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org Main Site */ - +namespace VuFind\Search\Favorites; +use VuFind\Search\Base\Options as BaseOptions; + /** * Search Favorites Options * @@ -35,7 +37,7 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org Main Site */ -class VF_Search_Favorites_Options extends VF_Search_Base_Options +class Options extends BaseOptions { /** * Constructor diff --git a/module/VuFind/src/VuFind/Search/Favorites/Params.php b/module/VuFind/src/VuFind/Search/Favorites/Params.php index 15582743fb0298f72615ab74f827b33fa5707fd4..e41f914a959f1630bd5776939629956c6e473ff9 100644 --- a/module/VuFind/src/VuFind/Search/Favorites/Params.php +++ b/module/VuFind/src/VuFind/Search/Favorites/Params.php @@ -25,7 +25,9 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org Main Site */ - +namespace VuFind\Search\Favorites; +use VuFind\Search\Base\Params as BaseParams; + /** * Search Favorites Parameters * @@ -35,7 +37,7 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org Main Site */ -class VF_Search_Favorites_Params extends VF_Search_Base_Params +class Params extends BaseParams { /** * Constructor diff --git a/module/VuFind/src/VuFind/Search/Favorites/Results.php b/module/VuFind/src/VuFind/Search/Favorites/Results.php index b687f924af02b9e7c53c1b9faa3cc2a434b2b14d..c0031cc0cb1767aa217b3757c95fc1a6f20af203 100644 --- a/module/VuFind/src/VuFind/Search/Favorites/Results.php +++ b/module/VuFind/src/VuFind/Search/Favorites/Results.php @@ -25,7 +25,13 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org Main Site */ - +namespace VuFind\Search\Favorites; +use VuFind\Account\Manager as AccountManager, + VuFind\Exception\ListPermission as ListPermissionException, + VuFind\Record, + VuFind\Search\Base\Results as BaseResults, + VuFind\Translator\Translator; + /** * Search Favorites Results * @@ -35,7 +41,7 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org Main Site */ -class VF_Search_Favorites_Results extends VF_Search_Base_Results +class Results extends BaseResults { protected $user = null; protected $list = false; @@ -118,22 +124,22 @@ class VF_Search_Favorites_Results extends VF_Search_Base_Results protected function performSearch() { $list = $this->getListObject(); - $account = VF_Account_Manager::getInstance(); + $account = AccountManager::getInstance(); $this->user = $account->isLoggedIn(); // Make sure the user and/or list objects make it possible to view // the current result set -- we need to check logged in status and // list permissions. if (is_null($list) && !$this->user) { - throw new VF_Exception_ListPermission( + throw new ListPermissionException( 'Cannot retrieve favorites without logged in user.' ); } if (!is_null($list) && !$list->public && (!$this->user || $list->user_id != $this->user->id) ) { - throw new VF_Exception_ListPermission( - VF_Translator::translate('list_access_denied') + throw new ListPermissionException( + Translator::translate('list_access_denied') ); } @@ -159,7 +165,7 @@ class VF_Search_Favorites_Results extends VF_Search_Base_Results ) ); } - $this->results = VF_Record::loadBatch($recordsToRequest); + $this->results = Record::loadBatch($recordsToRequest); } /** @@ -167,12 +173,12 @@ class VF_Search_Favorites_Results extends VF_Search_Base_Results * * @param string $id Unique identifier of record * - * @return VF_RecordDriver_Base + * @return \VuFind\RecordDriver\Base */ public static function getRecord($id) { - throw new Exception( - 'getRecord not supported by VF_Search_Favorites_Results' + throw new \Exception( + 'getRecord not supported by VuFind\\Search\\Favorites\\Results' ); } diff --git a/module/VuFind/src/VuFind/Search/MixedList/Options.php b/module/VuFind/src/VuFind/Search/MixedList/Options.php index 22e88d5c023f17bddecdd5ab938b5bfa3e8ac4bb..0d24130da3ae11e06fc874475c2b5eb14a334b33 100644 --- a/module/VuFind/src/VuFind/Search/MixedList/Options.php +++ b/module/VuFind/src/VuFind/Search/MixedList/Options.php @@ -25,7 +25,9 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org Main Site */ - +namespace VuFind\Search\MixedList; +use VuFind\Search\Base\Options as BaseOptions; + /** * Search Mixed List Options * @@ -35,7 +37,7 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org Main Site */ -class VF_Search_MixedList_Options extends VF_Search_Base_Options +class Options extends BaseOptions { /** * Return the route name for the search results action. diff --git a/module/VuFind/src/VuFind/Search/MixedList/Params.php b/module/VuFind/src/VuFind/Search/MixedList/Params.php index 42661e7833e57b331b8d224b2bf551b070a59bb5..fc723b7d419a194a25504e38142e16c848edddbc 100644 --- a/module/VuFind/src/VuFind/Search/MixedList/Params.php +++ b/module/VuFind/src/VuFind/Search/MixedList/Params.php @@ -25,7 +25,9 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org Main Site */ - +namespace VuFind\Search\MixedList; +use VuFind\Search\Base\Params as BaseParams; + /** * Search Mixed List Parameters * @@ -35,7 +37,7 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org Main Site */ -class VF_Search_MixedList_Params extends VF_Search_Base_Params +class Params extends BaseParams { protected $recordsToRequest; diff --git a/module/VuFind/src/VuFind/Search/MixedList/Results.php b/module/VuFind/src/VuFind/Search/MixedList/Results.php index 74be45f2e2eab176f92044947fd90432e2371c98..c8f180b8ae084a1e50854a709795d0d4bb487539 100644 --- a/module/VuFind/src/VuFind/Search/MixedList/Results.php +++ b/module/VuFind/src/VuFind/Search/MixedList/Results.php @@ -25,7 +25,9 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org Main Site */ - +namespace VuFind\Search\MixedList; +use VuFind\Record, VuFind\Search\Base\Results as BaseResults; + /** * Search Mixed List Results * @@ -35,7 +37,7 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org Main Site */ -class VF_Search_MixedList_Results extends VF_Search_Base_Results +class Results extends BaseResults { /** * Returns the stored list of facets for the last search @@ -60,7 +62,7 @@ class VF_Search_MixedList_Results extends VF_Search_Base_Results protected function performSearch() { $recordsToRequest = $this->params->getRecordsToRequest(); - $this->results = VF_Record::loadBatch($recordsToRequest); + $this->results = Record::loadBatch($recordsToRequest); $this->resultTotal = count($this->results); } @@ -69,12 +71,12 @@ class VF_Search_MixedList_Results extends VF_Search_Base_Results * * @param string $id Unique identifier of record * - * @return VF_RecordDriver_Base + * @return \VuFind\RecordDriver\Base */ public static function getRecord($id) { - throw new Exception( - 'getRecord not supported by VF_Search_MixedList_Results' + throw new \Exception( + 'getRecord not supported by VuFind\\Search\\MixedList\\Results' ); } } \ No newline at end of file diff --git a/module/VuFind/src/VuFind/Search/Solr/Results.php b/module/VuFind/src/VuFind/Search/Solr/Results.php index 9bcf708391ab4ab4b595dbf99928b9b43decffce..fe09913061838ccc03e524a603eb1a9ac582cc05 100644 --- a/module/VuFind/src/VuFind/Search/Solr/Results.php +++ b/module/VuFind/src/VuFind/Search/Solr/Results.php @@ -548,7 +548,7 @@ class Results extends BaseResults return new $driver($data); } - throw new Exception('Cannot find record driver -- ' . $driver); + throw new \Exception('Cannot find record driver -- ' . $driver); } /** diff --git a/module/VuFind/src/VuFind/Search/SolrAuth/Options.php b/module/VuFind/src/VuFind/Search/SolrAuth/Options.php index 0d334b58c05ab0c857423ec01e61e46e34489a96..52172b67266313c4e87b340e6630473af5681976 100644 --- a/module/VuFind/src/VuFind/Search/SolrAuth/Options.php +++ b/module/VuFind/src/VuFind/Search/SolrAuth/Options.php @@ -25,6 +25,8 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://www.vufind.org Main Page */ +namespace VuFind\Search\SolrAuth; +use VuFind\Search\Base\Options as BaseOptions; /** * Solr Authority Search Options @@ -35,7 +37,7 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://www.vufind.org Main Page */ -class VF_Search_SolrAuth_Options extends VF_Search_Solr_Options +class Options extends BaseOptions { /** * Constructor diff --git a/module/VuFind/src/VuFind/Search/SolrAuth/Params.php b/module/VuFind/src/VuFind/Search/SolrAuth/Params.php index aea7563f3cd44332d44341559c872bf5ebc1ef4a..b17f3e05297ca930fd6a54d1689f0b852682c950 100644 --- a/module/VuFind/src/VuFind/Search/SolrAuth/Params.php +++ b/module/VuFind/src/VuFind/Search/SolrAuth/Params.php @@ -25,6 +25,8 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://www.vufind.org Main Page */ +namespace VuFind\Search\SolrAuth; +use VuFind\Search\Base\Params as BaseParams; /** * Solr Authority Search Parameters @@ -35,6 +37,6 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://www.vufind.org Main Page */ -class VF_Search_SolrAuth_Params extends VF_Search_Solr_Params +class Params extends BaseParams; { } \ No newline at end of file diff --git a/module/VuFind/src/VuFind/Search/SolrAuth/Results.php b/module/VuFind/src/VuFind/Search/SolrAuth/Results.php index 88ade212815fa5a1a281caccbdca93145031b359..bb22442ddabfd08a0051e95d807ccc61f852affb 100644 --- a/module/VuFind/src/VuFind/Search/SolrAuth/Results.php +++ b/module/VuFind/src/VuFind/Search/SolrAuth/Results.php @@ -25,6 +25,10 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://www.vufind.org Main Page */ +namespace VuFind\Search\SolrAuth; +use VuFind\RecordDriver\SolrAuth as SolrAuthRecord, + VuFind\Search\Base\Params as BaseParams, + VuFind\Search\Base\Results as BaseResults; /** * Solr Authority Search Parameters @@ -35,7 +39,7 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://www.vufind.org Main Page */ -class VF_Search_SolrAuth_Results extends VF_Search_Solr_Results +class Results extends BaseResults { /** * Constructor @@ -43,7 +47,7 @@ class VF_Search_SolrAuth_Results extends VF_Search_Solr_Results * @param VF_Search_Base_Params $params Object representing user search * parameters. */ - public function __construct(VF_Search_Base_Params $params) + public function __construct(BaseParams $params) { parent::__construct($params); } @@ -72,6 +76,6 @@ class VF_Search_SolrAuth_Results extends VF_Search_Solr_Results */ protected static function initRecordDriver($data) { - return new VF_RecordDriver_SolrAuth($data); + return new SolrAuthRecord($data); } } \ No newline at end of file diff --git a/module/VuFind/src/VuFind/Search/SolrAuthor/Options.php b/module/VuFind/src/VuFind/Search/SolrAuthor/Options.php index 1fd539b915939ba70b3c154cff0cd9d3658ae03e..24b732595247dee59cb9bfc54d4f7b586a9e1683 100644 --- a/module/VuFind/src/VuFind/Search/SolrAuthor/Options.php +++ b/module/VuFind/src/VuFind/Search/SolrAuthor/Options.php @@ -25,7 +25,9 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org Main Site */ - +namespace VuFind\Search\SolrAuthor; +use VuFind\Search\Base\Options as BaseOptions; + /** * Author Search Options * @@ -35,7 +37,7 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org Main Site */ -class VF_Search_SolrAuthor_Options extends VF_Search_Solr_Options +class Options extends BaseOptions { /** * Constructor diff --git a/module/VuFind/src/VuFind/Search/SolrAuthor/Params.php b/module/VuFind/src/VuFind/Search/SolrAuthor/Params.php index ee30a716d432c54ca13b7c62e44ba60cbcc86a08..dafb9930af507a476121210042f8f2ea29850dd7 100644 --- a/module/VuFind/src/VuFind/Search/SolrAuthor/Params.php +++ b/module/VuFind/src/VuFind/Search/SolrAuthor/Params.php @@ -25,7 +25,9 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org Main Site */ - +namespace VuFind\Search\SolrAuthor; +use VuFind\Config\Reader as ConfigReader, VuFind\Search\Base\Params as BaseParams; + /** * Author Search Options * @@ -35,7 +37,7 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org Main Site */ -class VF_Search_SolrAuthor_Params extends VF_Search_Solr_Params +class Params extends BaseParams { /** * Support method for _initSearch() -- handle basic settings. @@ -86,7 +88,7 @@ class VF_Search_SolrAuthor_Params extends VF_Search_Solr_Params { // Load the necessary settings to determine the appropriate recommendations // module: - $ss = VF_Config_Reader::getConfig($this->getSearchIni()); + $ss = ConfigReader::getConfig($this->getSearchIni()); // Load the AuthorModuleRecommendations configuration if available, use // standard defaults otherwise: diff --git a/module/VuFind/src/VuFind/Search/SolrAuthor/Results.php b/module/VuFind/src/VuFind/Search/SolrAuthor/Results.php index 7c919db68e1c89c00ef99fc5832f685ddb5f140a..9f636a6e9bb7799eb4069a8ec258a73cefa2f36b 100644 --- a/module/VuFind/src/VuFind/Search/SolrAuthor/Results.php +++ b/module/VuFind/src/VuFind/Search/SolrAuthor/Results.php @@ -25,7 +25,9 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org Main Site */ - +namespace VuFind\Search\SolrAuthor; +use VuFind\Search\Base\Results as BaseResults; + /** * Author Search Options * @@ -36,7 +38,7 @@ * @link http://vufind.org Main Site */ -class VF_Search_SolrAuthor_Results extends VF_Search_Solr_Results +class Results extends BaseResults { /** * Constructor diff --git a/module/VuFind/src/VuFind/Search/SolrAuthorFacets/Options.php b/module/VuFind/src/VuFind/Search/SolrAuthorFacets/Options.php index 4279dd3aa141890cef652be53d407a200f915f59..4c4dadd827e807ceca809dff5556ef939d51eacd 100644 --- a/module/VuFind/src/VuFind/Search/SolrAuthorFacets/Options.php +++ b/module/VuFind/src/VuFind/Search/SolrAuthorFacets/Options.php @@ -25,7 +25,9 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org Main Site */ - +namespace VuFind\Search\SolrAuthorFacets; +use VuFind\Search\Base\Options as BaseOptions; + /** * AuthorFacets Search Options * @@ -35,7 +37,7 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org Main Site */ -class VF_Search_SolrAuthorFacets_Options extends VF_Search_Solr_Options +class Options extends BaseOptions { /** * Constructor diff --git a/module/VuFind/src/VuFind/Search/SolrAuthorFacets/Params.php b/module/VuFind/src/VuFind/Search/SolrAuthorFacets/Params.php index a8b710b092e7b489417e1314ebe0458a872628f0..5d317f3a77b93d622963bb5d3c99ee7a22d0e923 100644 --- a/module/VuFind/src/VuFind/Search/SolrAuthorFacets/Params.php +++ b/module/VuFind/src/VuFind/Search/SolrAuthorFacets/Params.php @@ -25,7 +25,9 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org Main Site */ - +namespace VuFind\Search\SolrAuthorFacets; +use VuFind\Search\Base\Params as BaseParams; + /** * AuthorFacets Search Parameters * @@ -35,7 +37,7 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org Main Site */ -class VF_Search_SolrAuthorFacets_Params extends VF_Search_Solr_Params +class Params extends BaseParams { /** * Set parameters based on a search object diff --git a/module/VuFind/src/VuFind/Search/SolrAuthorFacets/Results.php b/module/VuFind/src/VuFind/Search/SolrAuthorFacets/Results.php index 44520312a7546ac093c1be22b51babedb6a12051..8a9e0b72eb89e834e72e7a72d4c41493ab5cfa62 100644 --- a/module/VuFind/src/VuFind/Search/SolrAuthorFacets/Results.php +++ b/module/VuFind/src/VuFind/Search/SolrAuthorFacets/Results.php @@ -25,7 +25,10 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org Main Site */ - +namespace VuFind\Search\SolrAuthorFacets; +use VuFind\Connection\Manager as ConnectionManager, + VuFind\Search\Base\Results as BaseResults; + /** * AuthorFacets Search Results * @@ -35,7 +38,7 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org Main Site */ -class VF_Search_SolrAuthorFacets_Results extends VF_Search_Solr_Results +class Results extends BaseResults { /** * Support method for performAndProcessSearch -- perform a search based on the @@ -45,7 +48,7 @@ class VF_Search_SolrAuthorFacets_Results extends VF_Search_Solr_Results */ protected function performSearch() { - $solr = VF_Connection_Manager::connectToIndex(); + $solr = ConnectionManager::connectToIndex(); // Collect the search parameters: $params = array( diff --git a/module/VuFind/src/VuFind/Search/SolrReserves/Options.php b/module/VuFind/src/VuFind/Search/SolrReserves/Options.php index 70aa4421cddace4dc77b77b768b443a004722cf2..68b5f4641d37cb5d2bc52a7c78902acf92d6538e 100644 --- a/module/VuFind/src/VuFind/Search/SolrReserves/Options.php +++ b/module/VuFind/src/VuFind/Search/SolrReserves/Options.php @@ -26,6 +26,8 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://www.vufind.org Main Page */ +namespace VuFind\Search\SolrAuth; +use VuFind\Search\Base\Options as BaseOptions; /** * Solr Reserves Search Options @@ -37,7 +39,7 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://www.vufind.org Main Page */ -class VF_Search_SolrReserves_Options extends VF_Search_Solr_Options +class Options extends BaseOptions { /** * Constructor diff --git a/module/VuFind/src/VuFind/Search/SolrReserves/Params.php b/module/VuFind/src/VuFind/Search/SolrReserves/Params.php index 10eb95a963366008218bdf15713caafafbcc9048..ee802f670b4b32902adf93bc7da4580226d8c01d 100644 --- a/module/VuFind/src/VuFind/Search/SolrReserves/Params.php +++ b/module/VuFind/src/VuFind/Search/SolrReserves/Params.php @@ -26,6 +26,8 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://www.vufind.org Main Page */ +namespace VuFind\Search\SolrReserves; +use VuFind\Search\Base\Params as BaseParams; /** * Solr Reserves Search Parameters @@ -37,6 +39,6 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://www.vufind.org Main Page */ -class VF_Search_SolrReserves_Params extends VF_Search_Solr_Params +class Params extends BaseParams { } \ No newline at end of file diff --git a/module/VuFind/src/VuFind/Search/SolrReserves/Results.php b/module/VuFind/src/VuFind/Search/SolrReserves/Results.php index b5033d7286b3b6ed24a4f7d2278a2290e895caad..71ce186c2ada33c43c02e4caceef1595435f6a68 100644 --- a/module/VuFind/src/VuFind/Search/SolrReserves/Results.php +++ b/module/VuFind/src/VuFind/Search/SolrReserves/Results.php @@ -26,6 +26,10 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://www.vufind.org Main Page */ +namespace VuFind\Search\SolrReserves; +use VuFind\RecordDriver\SolrReserves as SolrReservesRecord, + VuFind\Search\Base\Params as BaseParams, + VuFind\Search\Base\Results as BaseResults; /** * Solr Reserves Search Parameters @@ -37,15 +41,15 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://www.vufind.org Main Page */ -class VF_Search_SolrReserves_Results extends VF_Search_Solr_Results +class Results extends BaseResults { /** * Constructor * - * @param VF_Search_Base_Params $params Object representing user search + * @param BaseParams $params Object representing user search * parameters. */ - public function __construct(VF_Search_Base_Params $params) + public function __construct(BaseParams $params) { parent::__construct($params); } @@ -55,9 +59,10 @@ class VF_Search_SolrReserves_Results extends VF_Search_Solr_Results * * @param null|array $shards Selected shards to use (null for defaults) * @param string $index ID of index/search classes to use (this assumes - * that VF_Search_$index_Options and VF_Connection_$index are both valid classes) + * that \VuFind\Search\$index\Options and \VuFind\Connection\$index are both + * valid classes) * - * @return VF_Connection_Solr + * @return \VuFind\Connection\Solr */ public static function getSolrConnection($shards = null, $index = 'SolrReserves' @@ -71,10 +76,10 @@ class VF_Search_SolrReserves_Results extends VF_Search_Solr_Results * * @param array $data Solr data * - * @return VF_RecordDriver_Base + * @return \VuFind\RecordDriver\Base */ protected static function initRecordDriver($data) { - return new VF_RecordDriver_SolrReserves($data); + return new SolrReservesRecord($data); } } \ No newline at end of file diff --git a/module/VuFind/src/VuFind/Search/Summon/Options.php b/module/VuFind/src/VuFind/Search/Summon/Options.php index 2e1358c972f360ed1c5399d24ab3a26b437a28af..273a6f1d2f06bff121ba99916883c97dd84b582e 100644 --- a/module/VuFind/src/VuFind/Search/Summon/Options.php +++ b/module/VuFind/src/VuFind/Search/Summon/Options.php @@ -25,6 +25,9 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://www.vufind.org Main Page */ +namespace VuFind\Search\Summon; +use VuFind\Config\Reader as ConfigReader, + VuFind\Search\Base\Options as BaseOptions; /** * Summon Search Options @@ -35,7 +38,7 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://www.vufind.org Main Page */ -class VF_Search_Summon_Options extends VF_Search_Base_Options +class Options extends BaseOptions { protected $resultLimit = 400; @@ -50,7 +53,7 @@ class VF_Search_Summon_Options extends VF_Search_Base_Options parent::__construct(); // Load facet preferences: - $facetSettings = VF_Config_Reader::getConfig($this->facetsIni); + $facetSettings = ConfigReader::getConfig($this->facetsIni); if (isset($facetSettings->Advanced_Settings->translated_facets) && count($facetSettings->Advanced_Facet_Settings->translated_facets) > 0 ) { @@ -65,7 +68,7 @@ class VF_Search_Summon_Options extends VF_Search_Base_Options } // Load the search configuration file: - $searchSettings = VF_Config_Reader::getConfig($this->searchIni); + $searchSettings = ConfigReader::getConfig($this->searchIni); // Set up highlighting preference if (isset($searchSettings->General->highlighting)) { diff --git a/module/VuFind/src/VuFind/Search/Summon/Params.php b/module/VuFind/src/VuFind/Search/Summon/Params.php index de56e03135a67683a2e0cbb519e0e5e614c5c85e..62bfed7539055e13be72aaf28522404ae2ac99a1 100644 --- a/module/VuFind/src/VuFind/Search/Summon/Params.php +++ b/module/VuFind/src/VuFind/Search/Summon/Params.php @@ -25,6 +25,8 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://www.vufind.org Main Page */ +namespace VuFind\Search\Summon; +use VuFind\Search\Base\Params as BaseParams; /** * Summon Search Parameters @@ -35,7 +37,7 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://www.vufind.org Main Page */ -class VF_Search_Summon_Params extends VF_Search_Base_Params +class Params extends BaseParams { protected $fullFacetSettings = array(); protected $dateFacetSettings = array(); diff --git a/module/VuFind/src/VuFind/Search/Summon/Results.php b/module/VuFind/src/VuFind/Search/Summon/Results.php index fbd19868b81e4ca04d1845ed96f8352e8a5d1dba..5fe016b25ae27aff26ee6f6ab9be436c39e02775 100644 --- a/module/VuFind/src/VuFind/Search/Summon/Results.php +++ b/module/VuFind/src/VuFind/Search/Summon/Results.php @@ -25,6 +25,14 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://www.vufind.org Main Page */ +namespace VuFind\Search\Summon; +use VuFind\Config\Reader as ConfigReader, + VuFind\Connection\Summon as SummonConnection, + VuFind\Connection\Summon\Query as SummonQuery, + VuFind\Exception\RecordMissing as RecordMissingException, + VuFind\RecordDriver\Summon as SummonRecord, + VuFind\Search\Base\Results as BaseResults, + VuFind\Translator\Translator; /** * Summon Search Parameters @@ -35,7 +43,7 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://www.vufind.org Main Page */ -class VF_Search_Summon_Results extends VF_Search_Base_Results +class Results extends BaseResults { // Raw search response: protected $rawResponse = null; @@ -43,16 +51,16 @@ class VF_Search_Summon_Results extends VF_Search_Base_Results /** * Get a connection to the Summon API. * - * @return VF_Connection_Summon + * @return SummonConnection */ public static function getSummonConnection() { static $conn = false; if (!$conn) { - $config = VF_Config_Reader::getConfig(); + $config = ConfigReader::getConfig(); $id = isset($config->Summon->apiId) ? $config->Summon->apiId : null; $key = isset($config->Summon->apiKey) ? $config->Summon->apiKey : null; - $conn = new VF_Connection_Summon($id, $key); + $conn = new SummonConnection($id, $key); } return $conn; } @@ -72,7 +80,7 @@ class VF_Search_Summon_Results extends VF_Search_Base_Results // Perform the actual search $summon = self::getSummonConnection(); - $query = new VF_Connection_Summon_Query( + $query = new SummonQuery( $summon->buildQuery($this->getSearchTerms()), array( 'sort' => $finalSort, @@ -126,15 +134,15 @@ class VF_Search_Summon_Results extends VF_Search_Base_Results * * @param string $id Unique identifier of record * - * @throws VF_Exception_RecordMissing - * @return VF_RecordDriver_Base + * @throws RecordMissingException + * @return \VuFind\RecordDriver\Base */ public static function getRecord($id) { $summon = static::getSummonConnection(); $record = $summon->getRecord($id); if (empty($record) || !isset($record['documents'][0])) { - throw new VF_Exception_RecordMissing( + throw new RecordMissingException( 'Record ' . $id . ' does not exist.' ); } @@ -147,11 +155,11 @@ class VF_Search_Summon_Results extends VF_Search_Base_Results * * @param array $data Raw record data * - * @return VF_RecordDriver_Base + * @return \VuFind\RecordDriver\Base */ protected static function initRecordDriver($data) { - return new VF_RecordDriver_Summon($data); + return new SummonRecord($data); } /** @@ -231,7 +239,7 @@ class VF_Search_Summon_Results extends VF_Search_Base_Results // Create display value: $current['counts'][$facetIndex]['displayText'] = $translate - ? VF_Translator::translate($facetDetails['value']) + ? Translator::translate($facetDetails['value']) : $facetDetails['value']; } diff --git a/module/VuFind/src/VuFind/Search/Tags/Options.php b/module/VuFind/src/VuFind/Search/Tags/Options.php index cd4b2ad9423cb36702312699f1e89133d9693d24..36c58e6acb49aa52e39bdf2eadf7c609794a3804 100644 --- a/module/VuFind/src/VuFind/Search/Tags/Options.php +++ b/module/VuFind/src/VuFind/Search/Tags/Options.php @@ -25,7 +25,9 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org Main Site */ - +namespace VuFind\Search\Tags; +use VuFind\Search\Base\Options as BaseOptions; + /** * Search Tags Options * @@ -35,7 +37,7 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org Main Site */ -class VF_Search_Tags_Options extends VF_Search_Base_Options +class Options extends BaseOptions { /** * Constructor diff --git a/module/VuFind/src/VuFind/Search/Tags/Params.php b/module/VuFind/src/VuFind/Search/Tags/Params.php index 10008e0534c5f261e5c34bc1d41baa65a1599057..657de06cf86f9a954a47f2af16765a90c4a68a0b 100644 --- a/module/VuFind/src/VuFind/Search/Tags/Params.php +++ b/module/VuFind/src/VuFind/Search/Tags/Params.php @@ -25,7 +25,9 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org Main Site */ - +namespace VuFind\Search\Tags; +use VuFind\Search\Base\Params as BaseParams; + /** * Search Tags Parameters * @@ -35,7 +37,7 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org Main Site */ -class VF_Search_Tags_Params extends VF_Search_Base_Params +class Params extends BaseParams { /** * Load all recommendation settings from the relevant ini file. Returns an diff --git a/module/VuFind/src/VuFind/Search/Tags/Results.php b/module/VuFind/src/VuFind/Search/Tags/Results.php index 2ccb7dac6618b7afed3a2449658197d826ba7b25..b61e4d8a0eacfdcadef8a762d615a1d631c15aac 100644 --- a/module/VuFind/src/VuFind/Search/Tags/Results.php +++ b/module/VuFind/src/VuFind/Search/Tags/Results.php @@ -25,7 +25,9 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org Main Site */ - +namespace VuFind\Search\Tags; +use VuFind\Record, VuFind\Search\Base\Results as BaseResults; + /** * Search Tags Results * @@ -35,7 +37,7 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org Main Site */ -class VF_Search_Tags_Results extends VF_Search_Base_Results +class Results extends BaseResults { /** * Support method for performAndProcessSearch -- perform a search based on the @@ -64,7 +66,7 @@ class VF_Search_Tags_Results extends VF_Search_Base_Results $recordsToRequest[] = array('id' => $row->record_id, 'source' => $row->source); } - $this->results = VF_Record::loadBatch($recordsToRequest); + $this->results = Record::loadBatch($recordsToRequest); } /** @@ -72,12 +74,12 @@ class VF_Search_Tags_Results extends VF_Search_Base_Results * * @param string $id Unique identifier of record * - * @return VF_RecordDriver_Base + * @return \VuFind\RecordDriver\Base */ public static function getRecord($id) { - throw new Exception( - 'getRecord not supported by VF_Tags_Favorites_Results' + throw new \Exception( + 'getRecord not supported by VuFind\\Tags\\Favorites\\Results' ); } diff --git a/module/VuFind/src/VuFind/Search/WorldCat/Options.php b/module/VuFind/src/VuFind/Search/WorldCat/Options.php index 2c9fb7f4fdf3597d260abac18be6764b30ee169e..37f74ee0d4922d192e44984d79e4107e01b22252 100644 --- a/module/VuFind/src/VuFind/Search/WorldCat/Options.php +++ b/module/VuFind/src/VuFind/Search/WorldCat/Options.php @@ -25,6 +25,9 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://www.vufind.org Main Page */ +namespace VuFind\Search\WorldCat; +use VuFind\Config\Reader as ConfigReader, + VuFind\Search\Base\Options as BaseOptions; /** * WorldCat Search Options @@ -35,7 +38,7 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://www.vufind.org Main Page */ -class VF_Search_WorldCat_Options extends VF_Search_Base_Options +class Options extends BaseOptions { /** * Constructor @@ -48,7 +51,7 @@ class VF_Search_WorldCat_Options extends VF_Search_Base_Options parent::__construct(); // Load the configuration file: - $searchSettings = VF_Config_Reader::getConfig($this->searchIni); + $searchSettings = ConfigReader::getConfig($this->searchIni); // Search handler setup: $this->defaultHandler = 'srw.kw'; diff --git a/module/VuFind/src/VuFind/Search/WorldCat/Params.php b/module/VuFind/src/VuFind/Search/WorldCat/Params.php index c11e2712d19639ae66517741ef9f46b76487122b..1e3a75569644d42740487de01b2a310d2d1abd72 100644 --- a/module/VuFind/src/VuFind/Search/WorldCat/Params.php +++ b/module/VuFind/src/VuFind/Search/WorldCat/Params.php @@ -25,6 +25,8 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://www.vufind.org Main Page */ +namespace VuFind\Search\WorldCat; +use VuFind\Search\Base\Params as BaseParams; /** * WorldCat Search Parameters @@ -35,7 +37,7 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://www.vufind.org Main Page */ -class VF_Search_WorldCat_Params extends VF_Search_Base_Params +class Params extends BaseParams { // Override Query protected $overrideQuery = false; diff --git a/module/VuFind/src/VuFind/Search/WorldCat/Results.php b/module/VuFind/src/VuFind/Search/WorldCat/Results.php index 728b5d87224eebd6b1c51b4f81d4600fe38c3557..6b7ee72b8b639b97e6af62c3816fd4c306c0b9fe 100644 --- a/module/VuFind/src/VuFind/Search/WorldCat/Results.php +++ b/module/VuFind/src/VuFind/Search/WorldCat/Results.php @@ -25,6 +25,12 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://www.vufind.org Main Page */ +namespace VuFind\Search\WorldCat; +use VuFind\Config\Reader as ConfigReader, + VuFind\Connection\WorldCat as WorldCatConnection, + VuFind\Exception\RecordMissing as RecordMissingException, + VuFind\RecordDriver\WorldCat as WorldCatRecord, + VuFind\Search\Base\Results as BaseResults; /** * WorldCat Search Parameters @@ -35,7 +41,7 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://www.vufind.org Main Page */ -class VF_Search_WorldCat_Results extends VF_Search_Base_Results +class Results extends BaseResults { // Raw search response: protected $rawResponse = null; @@ -43,13 +49,13 @@ class VF_Search_WorldCat_Results extends VF_Search_Base_Results /** * Get a connection to the WorldCat API. * - * @return VF_Connection_WorldCat + * @return WorldCatConnection */ public static function getWorldCatConnection() { static $wc = false; if (!$wc) { - $wc = new VF_Connection_WorldCat(); + $wc = new WorldCatConnection(); } return $wc; } @@ -63,7 +69,7 @@ class VF_Search_WorldCat_Results extends VF_Search_Base_Results protected function performSearch() { // Collect the search parameters: - $config = VF_Config_Reader::getConfig(); + $config = ConfigReader::getConfig(); $wc = static::getWorldCatConnection(); $overrideQuery = $this->getOverrideQuery(); $query = empty($overrideQuery) @@ -97,15 +103,15 @@ class VF_Search_WorldCat_Results extends VF_Search_Base_Results * * @param string $id Unique identifier of record * - * @throws VF_Exception_RecordMissing - * @return VF_RecordDriver_Base + * @throws RecordMissingException + * @return \VuFind\RecordDriver\Base */ public static function getRecord($id) { $wc = static::getWorldCatConnection(); $record = $wc->getRecord($id); if (empty($record)) { - throw new VF_Exception_RecordMissing( + throw new RecordMissingException( 'Record ' . $id . ' does not exist.' ); } @@ -118,11 +124,11 @@ class VF_Search_WorldCat_Results extends VF_Search_Base_Results * * @param array $data Raw record data * - * @return VF_RecordDriver_Base + * @return \VuFind\RecordDriver\Base */ protected static function initRecordDriver($data) { - return new VF_RecordDriver_WorldCat($data); + return new WorldCatRecord($data); } /** diff --git a/module/VuFind/src/VuFind/Theme/Root/Helper/AuthorNotes.php b/module/VuFind/src/VuFind/Theme/Root/Helper/AuthorNotes.php index 82367e086e8aeecad28c6c2f8632c21d4219d84a..7867a7173450820d1fdef3262b8f991d0e3095e4 100644 --- a/module/VuFind/src/VuFind/Theme/Root/Helper/AuthorNotes.php +++ b/module/VuFind/src/VuFind/Theme/Root/Helper/AuthorNotes.php @@ -145,7 +145,7 @@ class VuFind_Theme_Root_Helper_AuthorNotes extends Zend_View_Helper_Abstract // Test XML Response if (!($xmldoc = @DOMDocument::loadXML($result->getBody()))) { - throw new Exception('Invalid XML'); + throw new \Exception('Invalid XML'); } $i = 0; @@ -165,7 +165,7 @@ class VuFind_Theme_Root_Helper_AuthorNotes extends Zend_View_Helper_Abstract // Test XML Response $xmldoc2 = @DOMDocument::loadXML($result2->getBody()); if (!$xmldoc2) { - throw new Exception('Invalid XML'); + throw new \Exception('Invalid XML'); } // If we have syndetics plus, we don't actually want the content diff --git a/module/VuFind/src/VuFind/Theme/Root/Helper/Excerpt.php b/module/VuFind/src/VuFind/Theme/Root/Helper/Excerpt.php index 1da832e88153917d306febded4a20b3a6452941f..fa2f6c939cc91c8b49c926a7a2c20629e2b62d05 100644 --- a/module/VuFind/src/VuFind/Theme/Root/Helper/Excerpt.php +++ b/module/VuFind/src/VuFind/Theme/Root/Helper/Excerpt.php @@ -146,7 +146,7 @@ class VuFind_Theme_Root_Helper_Excerpt extends Zend_View_Helper_Abstract // Test XML Response if (!($xmldoc = @DOMDocument::loadXML($result->getBody()))) { - throw new Exception('Invalid XML'); + throw new \Exception('Invalid XML'); } $i = 0; @@ -166,7 +166,7 @@ class VuFind_Theme_Root_Helper_Excerpt extends Zend_View_Helper_Abstract // Test XML Response $xmldoc2 = @DOMDocument::loadXML($result2->getBody()); if (!$xmldoc2) { - throw new Exception('Invalid XML'); + throw new \Exception('Invalid XML'); } // If we have syndetics plus, we don't actually want the content diff --git a/module/VuFind/src/VuFind/Theme/Root/Helper/RecordLink.php b/module/VuFind/src/VuFind/Theme/Root/Helper/RecordLink.php index a4d2ba43cb43c3df853af7991ac8f3e1512cd596..76454772f1ac9d01c46fae0c943a2563029e69df 100644 --- a/module/VuFind/src/VuFind/Theme/Root/Helper/RecordLink.php +++ b/module/VuFind/src/VuFind/Theme/Root/Helper/RecordLink.php @@ -68,7 +68,7 @@ class VuFind_Theme_Root_Helper_RecordLink extends Zend_View_Helper_Abstract . '&type=oclc_num&jumpto=1'; break; default: - throw new Exception('Unexpected link type: ' . $link['type']); + throw new \Exception('Unexpected link type: ' . $link['type']); } return $escape ? $this->view->escape($url) : $url; diff --git a/module/VuFind/src/VuFind/Theme/Root/Helper/Reviews.php b/module/VuFind/src/VuFind/Theme/Root/Helper/Reviews.php index 53c8b3bfb5755030ed7e183ee998ee3456bf607d..6790567b893230cd2d2ebf6c1e38b3ca0354e871 100644 --- a/module/VuFind/src/VuFind/Theme/Root/Helper/Reviews.php +++ b/module/VuFind/src/VuFind/Theme/Root/Helper/Reviews.php @@ -324,7 +324,7 @@ class VuFind_Theme_Root_Helper_Reviews extends Zend_View_Helper_Abstract // Test XML Response if (!($xmldoc = @DOMDocument::loadXML($result->getBody()))) { - throw new Exception('Invalid XML'); + throw new \Exception('Invalid XML'); } $i = 0; @@ -343,7 +343,7 @@ class VuFind_Theme_Root_Helper_Reviews extends Zend_View_Helper_Abstract // Test XML Response $xmldoc2 = @DOMDocument::loadXML($result2->getBody()); if (!$xmldoc2) { - throw new Exception('Invalid XML'); + throw new \Exception('Invalid XML'); } // If we have syndetics plus, we don't actually want the content @@ -479,7 +479,7 @@ class VuFind_Theme_Root_Helper_Reviews extends Zend_View_Helper_Abstract } return $result; } else { - throw new Exception('Could not parse Guardian response.'); + throw new \Exception('Could not parse Guardian response.'); } } else { return array(); diff --git a/module/VuFind/src/VuFind/Theme/Root/Helper/VideoClips.php b/module/VuFind/src/VuFind/Theme/Root/Helper/VideoClips.php index 211c5e955cf43f00adb57d0a49ab289084c0009c..7cbd0f617d889f5e47c8fcbf588c9b42d562a470 100644 --- a/module/VuFind/src/VuFind/Theme/Root/Helper/VideoClips.php +++ b/module/VuFind/src/VuFind/Theme/Root/Helper/VideoClips.php @@ -145,7 +145,7 @@ class VuFind_Theme_Root_Helper_VideoClips extends Zend_View_Helper_Abstract // Test XML Response if (!($xmldoc = @DOMDocument::loadXML($result->getBody()))) { - throw new Exception('Invalid XML'); + throw new \Exception('Invalid XML'); } $i = 0; @@ -165,7 +165,7 @@ class VuFind_Theme_Root_Helper_VideoClips extends Zend_View_Helper_Abstract // Test XML Response $xmldoc2 = @DOMDocument::loadXML($result2->getBody()); if (!$xmldoc2) { - throw new Exception('Invalid XML'); + throw new \Exception('Invalid XML'); } // If we have syndetics plus, we don't actually want the content