From dc88c26fd8611266fcf14ef99c6d9c9ff70ca5f4 Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Mon, 2 Jul 2012 15:26:40 -0400
Subject: [PATCH] Progress on namespacing.

---
 module/VuFind/src/VuFind/Bootstrap.php        |  2 +-
 module/VuFind/src/VuFind/Cache/Manager.php    |  2 +-
 module/VuFind/src/VuFind/Config/Writer.php    |  2 +-
 .../VuFind/src/VuFind/Connection/Oracle.php   |  2 +-
 module/VuFind/src/VuFind/Connection/SRU.php   |  4 +--
 .../src/VuFind/Connection/SolrReserves.php    |  2 +-
 .../VuFind/src/VuFind/Search/Base/Params.php  |  8 ++---
 .../VuFind/src/VuFind/Search/Base/Results.php |  6 ++--
 .../src/VuFind/Search/Empty/Results.php       |  6 ++--
 .../src/VuFind/Search/Favorites/Options.php   |  6 ++--
 .../src/VuFind/Search/Favorites/Params.php    |  6 ++--
 .../src/VuFind/Search/Favorites/Results.php   | 26 +++++++++-------
 .../src/VuFind/Search/MixedList/Options.php   |  6 ++--
 .../src/VuFind/Search/MixedList/Params.php    |  6 ++--
 .../src/VuFind/Search/MixedList/Results.php   | 14 +++++----
 .../VuFind/src/VuFind/Search/Solr/Results.php |  2 +-
 .../src/VuFind/Search/SolrAuth/Options.php    |  4 ++-
 .../src/VuFind/Search/SolrAuth/Params.php     |  4 ++-
 .../src/VuFind/Search/SolrAuth/Results.php    | 10 +++++--
 .../src/VuFind/Search/SolrAuthor/Options.php  |  6 ++--
 .../src/VuFind/Search/SolrAuthor/Params.php   |  8 +++--
 .../src/VuFind/Search/SolrAuthor/Results.php  |  6 ++--
 .../Search/SolrAuthorFacets/Options.php       |  6 ++--
 .../VuFind/Search/SolrAuthorFacets/Params.php |  6 ++--
 .../Search/SolrAuthorFacets/Results.php       |  9 ++++--
 .../VuFind/Search/SolrReserves/Options.php    |  4 ++-
 .../src/VuFind/Search/SolrReserves/Params.php |  4 ++-
 .../VuFind/Search/SolrReserves/Results.php    | 19 +++++++-----
 .../src/VuFind/Search/Summon/Options.php      |  9 ++++--
 .../src/VuFind/Search/Summon/Params.php       |  4 ++-
 .../src/VuFind/Search/Summon/Results.php      | 30 ++++++++++++-------
 .../VuFind/src/VuFind/Search/Tags/Options.php |  6 ++--
 .../VuFind/src/VuFind/Search/Tags/Params.php  |  6 ++--
 .../VuFind/src/VuFind/Search/Tags/Results.php | 14 +++++----
 .../src/VuFind/Search/WorldCat/Options.php    |  7 +++--
 .../src/VuFind/Search/WorldCat/Params.php     |  4 ++-
 .../src/VuFind/Search/WorldCat/Results.php    | 24 +++++++++------
 .../VuFind/Theme/Root/Helper/AuthorNotes.php  |  4 +--
 .../src/VuFind/Theme/Root/Helper/Excerpt.php  |  4 +--
 .../VuFind/Theme/Root/Helper/RecordLink.php   |  2 +-
 .../src/VuFind/Theme/Root/Helper/Reviews.php  |  6 ++--
 .../VuFind/Theme/Root/Helper/VideoClips.php   |  4 +--
 42 files changed, 194 insertions(+), 116 deletions(-)

diff --git a/module/VuFind/src/VuFind/Bootstrap.php b/module/VuFind/src/VuFind/Bootstrap.php
index 6c23596a2d3..da47ab9ef67 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 c6cc1f19540..04281c7cd87 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 daf0e83e1f4..572d1c3c1e7 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 929188bf628..3029ade46ab 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 c8030f2f6e8..311b66c38a5 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 4128006fb20..da1f6893577 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 6c2f61a3ecd..e5b284cdb5e 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 3e842f76ce6..8927e556329 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 2dc46a2dba2..8068e905ef3 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 cd166fa7261..59743349ed5 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 15582743fb0..e41f914a959 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 b687f924af0..c0031cc0cb1 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 22e88d5c023..0d24130da3a 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 42661e7833e..fc723b7d419 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 74be45f2e2e..c8f180b8ae0 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 9bcf708391a..fe099130618 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 0d334b58c05..52172b67266 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 aea7563f3cd..b17f3e05297 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 88ade212815..bb22442ddab 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 1fd539b9159..24b73259524 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 ee30a716d43..dafb9930af5 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 7c919db68e1..9f636a6e9bb 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 4279dd3aa14..4c4dadd827e 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 a8b710b092e..5d317f3a77b 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 44520312a75..8a9e0b72eb8 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 70aa4421cdd..68b5f4641d3 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 10eb95a9633..ee802f670b4 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 b5033d7286b..71ce186c2ad 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 2e1358c972f..273a6f1d2f0 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 de56e03135a..62bfed75390 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 fbd19868b81..5fe016b25ae 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 cd4b2ad9423..36c58e6acb4 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 10008e0534c..657de06cf86 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 2ccb7dac661..b61e4d8a0ea 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 2c9fb7f4fdf..37f74ee0d49 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 c11e2712d19..1e3a7556964 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 728b5d87224..6b7ee72b8b6 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 82367e086e8..7867a717345 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 1da832e8815..fa2f6c939cc 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 a4d2ba43cb4..76454772f1a 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 53c8b3bfb57..6790567b893 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 211c5e955cf..7cbd0f617d8 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
-- 
GitLab