diff --git a/module/VuFind/config/module.config.php b/module/VuFind/config/module.config.php index a88ed1a28bad43fa0a024f6708673a094ce70861..7f953c9d8aa90c167d12529ab71fe9d21ed66ac1 100644 --- a/module/VuFind/config/module.config.php +++ b/module/VuFind/config/module.config.php @@ -286,7 +286,9 @@ $config = array( $catalog = new \VuFind\ILS\Connection(); return $catalog ->setConfig(\VuFind\Config\Reader::getConfig()->Catalog) - ->initWithDriverManager($sm->get('ILSDriverPluginManager')); + ->initWithDriverManager( + $sm->get('VuFind\ILSDriverPluginManager') + ); }, 'logger' => function ($sm) { $logger = new \VuFind\Log\Logger(); diff --git a/module/VuFind/src/VuFind/Auth/Manager.php b/module/VuFind/src/VuFind/Auth/Manager.php index 8faef2f76117b65cf4cf329b7118013ef07796d3..18eab5c6d6164ab3503e5014a61b73f9fedab2f3 100644 --- a/module/VuFind/src/VuFind/Auth/Manager.php +++ b/module/VuFind/src/VuFind/Auth/Manager.php @@ -82,7 +82,7 @@ class Manager implements ServiceLocatorAwareInterface protected function getAuth() { if (!$this->auth) { - $manager = $this->getServiceLocator()->get('AuthPluginManager'); + $manager = $this->getServiceLocator()->get('VuFind\AuthPluginManager'); $this->auth = $manager->get($this->config->Authentication->method); $this->auth->setConfig($this->config); } @@ -196,7 +196,7 @@ class Manager implements ServiceLocatorAwareInterface // restore its service locator, since SL's can't be serialized: if ($user && null === $user->getServiceLocator()) { $user->setServiceLocator( - $this->getServiceLocator()->get('DbTablePluginManager') + $this->getServiceLocator()->get('VuFind\DbTablePluginManager') ); } diff --git a/module/VuFind/src/VuFind/Bootstrap.php b/module/VuFind/src/VuFind/Bootstrap.php index d2364aa2f3ee0fe782c86ae6a73c55634ef611e8..afa9b0ef9f4234818db87ccf9cb99b8b4a7b4087 100644 --- a/module/VuFind/src/VuFind/Bootstrap.php +++ b/module/VuFind/src/VuFind/Bootstrap.php @@ -93,7 +93,7 @@ class Bootstrap 'Statistics\Driver' ); foreach ($namespaces as $ns) { - $serviceName = str_replace('\\', '', $ns) . 'PluginManager'; + $serviceName = 'VuFind\\' . str_replace('\\', '', $ns) . 'PluginManager'; $className = 'VuFind\\' . $ns . '\PluginManager'; $configKey = strtolower(str_replace('\\', '_', $ns)) . '_plugin_manager'; $service = new $className( @@ -137,7 +137,7 @@ class Bootstrap // manager and injecting appropriate dependencies: $serviceManager = $this->event->getApplication()->getServiceManager(); $sessionManager = $serviceManager->get('SessionManager'); - $sessionPluginManager = $serviceManager->get('SessionPluginManager'); + $sessionPluginManager = $serviceManager->get('VuFind\SessionPluginManager'); $sessionHandler = $sessionPluginManager->get($this->config->Session->type); $sessionHandler->setConfig($this->config->Session); $sessionManager->setSaveHandler($sessionHandler); diff --git a/module/VuFind/src/VuFind/Connection/Solr.php b/module/VuFind/src/VuFind/Connection/Solr.php index e3b837a1b3297897c647d3237e781c53906c1eb5..acb38386f6c129192664f88803f296a3b5be45b8 100644 --- a/module/VuFind/src/VuFind/Connection/Solr.php +++ b/module/VuFind/src/VuFind/Connection/Solr.php @@ -1156,7 +1156,7 @@ class Solr implements ServiceLocatorAwareInterface // Record the deletions in our change tracker database: foreach ($idList as $id) { - $tracker = $this->getServiceLocator()->get('DbTablePluginManager') + $tracker = $this->getServiceLocator()->get('VuFind\DbTablePluginManager') ->get('ChangeTracker'); $tracker->markDeleted($this->core, $id); } diff --git a/module/VuFind/src/VuFind/Controller/AbstractBase.php b/module/VuFind/src/VuFind/Controller/AbstractBase.php index b63961b3febb168b8695efbb7aca0934e77a4010..6b84ff05baa238e73f2385684500fd02ee362580 100644 --- a/module/VuFind/src/VuFind/Controller/AbstractBase.php +++ b/module/VuFind/src/VuFind/Controller/AbstractBase.php @@ -228,7 +228,8 @@ class AbstractBase extends AbstractActionController */ public function getTable($table) { - return $this->getServiceLocator()->get('DbTablePluginManager')->get($table); + return $this->getServiceLocator()->get('VuFind\DbTablePluginManager') + ->get($table); } /** diff --git a/module/VuFind/src/VuFind/Controller/AjaxController.php b/module/VuFind/src/VuFind/Controller/AjaxController.php index a7e01a832c9d574870107a36419f0609481fbdc5..a51c523aa7c2aa712bafd6264f02dc8027849332 100644 --- a/module/VuFind/src/VuFind/Controller/AjaxController.php +++ b/module/VuFind/src/VuFind/Controller/AjaxController.php @@ -102,7 +102,7 @@ class AjaxController extends AbstractBase // since deferred recommendations work best for modules that don't care about // the details of the search objects anyway: $sm = $this->getSearchManager(); - $rm = $this->getServiceLocator()->get('RecommendPluginManager'); + $rm = $this->getServiceLocator()->get('VuFind\RecommendPluginManager'); $module = $rm->get($this->params()->fromQuery('mod')); $module->setConfig($this->params()->fromQuery('params')); $params = $sm->setSearchClassId('Solr')->getParams(); @@ -919,7 +919,7 @@ class AjaxController extends AbstractBase { $query = $this->getRequest()->getQuery(); $autocompleteManager = $this->getServiceLocator() - ->get('AutocompletePluginManager'); + ->get('VuFind\AutocompletePluginManager'); return $this->output( $autocompleteManager->getSuggestions($query), self::STATUS_OK ); @@ -1219,7 +1219,7 @@ class AjaxController extends AbstractBase $resolverType = isset($config->OpenURL->resolver) ? $config->OpenURL->resolver : 'other'; $pluginManager = $this->getServiceLocator() - ->get('ResolverDriverPluginManager'); + ->get('VuFind\ResolverDriverPluginManager'); if (!$pluginManager->has($resolverType)) { return $this->output( $this->translate("Could not load driver for $resolverType"), diff --git a/module/VuFind/src/VuFind/Controller/MyResearchController.php b/module/VuFind/src/VuFind/Controller/MyResearchController.php index d3503b55387a436bead8de5603899245ce37ea9f..cef4dfe119dfe442de0fd84618921de68073761b 100644 --- a/module/VuFind/src/VuFind/Controller/MyResearchController.php +++ b/module/VuFind/src/VuFind/Controller/MyResearchController.php @@ -743,7 +743,8 @@ class MyResearchController extends AbstractBase $record = $this->getSearchManager()->setSearchClassId('Solr') ->getResults()->getRecord($current['id']); } catch (RecordMissingException $e) { - $factory = $this->getServiceLocator()->get('RecordDriverPluginManager'); + $factory = $this->getServiceLocator() + ->get('VuFind\RecordDriverPluginManager'); $record = $factory->get('Missing'); $record->setRawData( array('id' => isset($current['id']) ? $current['id'] : null) diff --git a/module/VuFind/src/VuFind/Controller/SearchController.php b/module/VuFind/src/VuFind/Controller/SearchController.php index 17cbb8882dbbe95588c0eead08d709ffff1ad6fe..3d764154d09356332f9b236bd202b39e59df852f 100644 --- a/module/VuFind/src/VuFind/Controller/SearchController.php +++ b/module/VuFind/src/VuFind/Controller/SearchController.php @@ -593,7 +593,7 @@ class SearchController extends AbstractSearch // Get suggestions and make sure they are an array (we don't want to JSON // encode them into an object): $autocompleteManager = $this->getServiceLocator() - ->get('AutocompletePluginManager'); + ->get('VuFind\AutocompletePluginManager'); $suggestions = $autocompleteManager->getSuggestions( $query, 'type', 'lookfor' ); diff --git a/module/VuFind/src/VuFind/OAI/Server.php b/module/VuFind/src/VuFind/OAI/Server.php index d4cd1d6f9d06bb22ff0f3b120ffef09f593a4bd4..2029f7a812c44ede5c1414bd44de914d343ba0d5 100644 --- a/module/VuFind/src/VuFind/OAI/Server.php +++ b/module/VuFind/src/VuFind/OAI/Server.php @@ -78,7 +78,8 @@ class Server public function __construct(\VuFind\Search\Manager $sm, $baseURL, $params) { $this->searchManager = $sm; - $this->tableManager = $sm->getServiceLocator()->get('DbTablePluginManager'); + $this->tableManager = $sm->getServiceLocator() + ->get('VuFind\DbTablePluginManager'); $this->baseURL = $baseURL; $this->params = isset($params) && is_array($params) ? $params : array(); $this->initializeMetadataFormats(); // Load details on supported formats diff --git a/module/VuFind/src/VuFind/Record/Loader.php b/module/VuFind/src/VuFind/Record/Loader.php index 6ed4c6040fd2800c48b2817fadba05dc86270c8f..9ffbfc87a6350464aa7851e47b495ea56f4b2a44 100644 --- a/module/VuFind/src/VuFind/Record/Loader.php +++ b/module/VuFind/src/VuFind/Record/Loader.php @@ -133,7 +133,7 @@ class Loader implements ServiceLocatorAwareInterface ? $details['extra_fields'] : array(); $fields['id'] = $details['id']; $factory = $this->getServiceLocator() - ->get('RecordDriverPluginManager'); + ->get('VuFind\RecordDriverPluginManager'); $retVal[$i] = $factory->get('Missing'); $retVal[$i]->setRawData($fields); $retVal[$i]->setResourceSource($details['source']); diff --git a/module/VuFind/src/VuFind/RecordDriver/AbstractBase.php b/module/VuFind/src/VuFind/RecordDriver/AbstractBase.php index ec95ed9f576847bc78e8efb00f6aebcbf06d25ef..9a5494c831322c81785f6b6ff1f1682c8a7b896d 100644 --- a/module/VuFind/src/VuFind/RecordDriver/AbstractBase.php +++ b/module/VuFind/src/VuFind/RecordDriver/AbstractBase.php @@ -279,7 +279,7 @@ abstract class AbstractBase implements ServiceLocatorAwareInterface $type = $parts[0]; $params = isset($parts[1]) ? $parts[1] : null; $factory = $this->getServiceLocator()->getServiceLocator() - ->get('RelatedPluginManager'); + ->get('VuFind\RelatedPluginManager'); if ($factory->has($type)) { $plugin = $factory->get($type); $plugin->init($params, $this); @@ -468,7 +468,7 @@ abstract class AbstractBase implements ServiceLocatorAwareInterface protected function getDbTable($table) { return $this->getServiceLocator()->getServiceLocator() - ->get('DbTablePluginManager')->get($table); + ->get('VuFind\DbTablePluginManager')->get($table); } /** diff --git a/module/VuFind/src/VuFind/Search/Base/Params.php b/module/VuFind/src/VuFind/Search/Base/Params.php index 3db4d1c9c092beb0353d1dd3e7614f0930431bdf..7d825cba1205fa690665b689ffab86af25eaa039 100644 --- a/module/VuFind/src/VuFind/Search/Base/Params.php +++ b/module/VuFind/src/VuFind/Search/Base/Params.php @@ -792,10 +792,10 @@ class Params implements ServiceLocatorAwareInterface // Get the plugin manager (skip recommendations if it is unavailable): $sm = $this->getServiceLocator(); - if (!is_object($sm) || !$sm->has('RecommendPluginManager')) { + if (!is_object($sm) || !$sm->has('VuFind\RecommendPluginManager')) { return; } - $manager = $sm->get('RecommendPluginManager'); + $manager = $sm->get('VuFind\RecommendPluginManager'); // Process recommendations for each location: $this->recommend = array( @@ -1560,7 +1560,8 @@ class Params implements ServiceLocatorAwareInterface */ public function getTable($table) { - return $this->getServiceLocator()->get('DbTablePluginManager')->get($table); + return $this->getServiceLocator()->get('VuFind\DbTablePluginManager') + ->get($table); } /** diff --git a/module/VuFind/src/VuFind/Search/Base/Results.php b/module/VuFind/src/VuFind/Search/Base/Results.php index 4028906245492d92d10adab392383d9e4c1f0589..ef4d5b378e332e1d2aec5af50659f5e939929fef 100644 --- a/module/VuFind/src/VuFind/Search/Base/Results.php +++ b/module/VuFind/src/VuFind/Search/Base/Results.php @@ -611,7 +611,8 @@ abstract class Results implements ServiceLocatorAwareInterface */ public function getTable($table) { - return $this->getServiceLocator()->get('DbTablePluginManager')->get($table); + return $this->getServiceLocator()->get('VuFind\DbTablePluginManager') + ->get($table); } /** diff --git a/module/VuFind/src/VuFind/Search/Solr/Results.php b/module/VuFind/src/VuFind/Search/Solr/Results.php index 1e9e6a280a3842e22ec966961f4f032a39d6e1e9..232e2a9fe90d8f47b624cddd665b6531d1c111a7 100644 --- a/module/VuFind/src/VuFind/Search/Solr/Results.php +++ b/module/VuFind/src/VuFind/Search/Solr/Results.php @@ -537,7 +537,8 @@ class Results extends BaseResults */ protected function initRecordDriver($data) { - $factory = $this->getServiceLocator()->get('RecordDriverPluginManager'); + $factory = $this->getServiceLocator() + ->get('VuFind\RecordDriverPluginManager'); $key = 'Solr' . ucwords($data['recordtype']); $recordType = $factory->has($key) ? $key : 'SolrDefault'; diff --git a/module/VuFind/src/VuFind/Search/SolrAuth/Results.php b/module/VuFind/src/VuFind/Search/SolrAuth/Results.php index 35fb26ebb19300e5efcdf7adf3cac6da36be9607..4c54cb5e98cf31734783942b6064377910213f03 100644 --- a/module/VuFind/src/VuFind/Search/SolrAuth/Results.php +++ b/module/VuFind/src/VuFind/Search/SolrAuth/Results.php @@ -63,7 +63,8 @@ class Results extends \VuFind\Search\Solr\Results */ protected function initRecordDriver($data) { - $factory = $this->getServiceLocator()->get('RecordDriverPluginManager'); + $factory = $this->getServiceLocator() + ->get('VuFind\RecordDriverPluginManager'); $driver = $factory->get('SolrAuth'); $driver->setRawData($data); return $driver; diff --git a/module/VuFind/src/VuFind/Search/SolrReserves/Results.php b/module/VuFind/src/VuFind/Search/SolrReserves/Results.php index 0b3038b7d5bf8bd214bad2f562cf8232d80808eb..1a11649d02a8542fc9dcadb5848361d1c66a82e3 100644 --- a/module/VuFind/src/VuFind/Search/SolrReserves/Results.php +++ b/module/VuFind/src/VuFind/Search/SolrReserves/Results.php @@ -65,7 +65,8 @@ class Results extends \VuFind\Search\Solr\Results */ protected function initRecordDriver($data) { - $factory = $this->getServiceLocator()->get('RecordDriverPluginManager'); + $factory = $this->getServiceLocator() + ->get('VuFind\RecordDriverPluginManager'); $driver = $factory->get('SolrReserves'); $driver->setRawData($data); return $driver; diff --git a/module/VuFind/src/VuFind/Search/Summon/Results.php b/module/VuFind/src/VuFind/Search/Summon/Results.php index efe1dce981f8d439418ac5b724b6ad9e237e93b6..daa34c865ecb59de793a5c352f9c5a6bc9dd81df 100644 --- a/module/VuFind/src/VuFind/Search/Summon/Results.php +++ b/module/VuFind/src/VuFind/Search/Summon/Results.php @@ -160,7 +160,8 @@ class Results extends BaseResults */ protected function initRecordDriver($data) { - $factory = $this->getServiceLocator()->get('RecordDriverPluginManager'); + $factory = $this->getServiceLocator() + ->get('VuFind\RecordDriverPluginManager'); $driver = $factory->get('Summon'); $driver->setRawData($data); return $driver; diff --git a/module/VuFind/src/VuFind/Search/WorldCat/Results.php b/module/VuFind/src/VuFind/Search/WorldCat/Results.php index bd219419d7c3fab5b75ecbf4309263ede18d5401..345aea6b8d104c2b474a0151bdc669b353adc527 100644 --- a/module/VuFind/src/VuFind/Search/WorldCat/Results.php +++ b/module/VuFind/src/VuFind/Search/WorldCat/Results.php @@ -124,7 +124,8 @@ class Results extends BaseResults */ protected function initRecordDriver($data) { - $factory = $this->getServiceLocator()->get('RecordDriverPluginManager'); + $factory = $this->getServiceLocator() + ->get('VuFind\RecordDriverPluginManager'); $driver = $factory->get('WorldCat'); $driver->setRawData($data); return $driver; diff --git a/module/VuFind/src/VuFind/ServiceManager/AbstractPluginManager.php b/module/VuFind/src/VuFind/ServiceManager/AbstractPluginManager.php index 7e71e9f88adbce0eb9851d0465240a2603cc9c8d..0b71c1c416963695ee220c4d5065780b0306a95e 100644 --- a/module/VuFind/src/VuFind/ServiceManager/AbstractPluginManager.php +++ b/module/VuFind/src/VuFind/ServiceManager/AbstractPluginManager.php @@ -54,7 +54,7 @@ abstract class AbstractPluginManager extends Base $initializer = function ($instance, $manager) { if ($instance instanceof \VuFind\Db\Table\DbTableAwareInterface) { $instance->setDbTableManager( - $manager->getServiceLocator()->get('DbTablePluginManager') + $manager->getServiceLocator()->get('VuFind\DbTablePluginManager') ); } if (method_exists($instance, 'setPluginManager')) { diff --git a/module/VuFind/src/VuFind/Statistics/AbstractBase.php b/module/VuFind/src/VuFind/Statistics/AbstractBase.php index d157f456a05b1df177cfdbfa843bd65e186840f6..0683f1d7e8a571bf3bb108a4244ee76ecd9e70e2 100644 --- a/module/VuFind/src/VuFind/Statistics/AbstractBase.php +++ b/module/VuFind/src/VuFind/Statistics/AbstractBase.php @@ -139,7 +139,7 @@ abstract class AbstractBase implements ServiceLocatorAwareInterface // If we got this far, we want the current option! Build the driver: $loader = $this->getServiceLocator() - ->get('StatisticsDriverPluginManager'); + ->get('VuFind\StatisticsDriverPluginManager'); $newDriver = $loader->get($setting[0]); // Set the name of the data source; we use the special value diff --git a/module/VuFind/src/VuFind/XSLT/Import/VuFind.php b/module/VuFind/src/VuFind/XSLT/Import/VuFind.php index 03e4930f74b362876f5b3376cfeeae8bd9248a99..648c210a5460c2221e24da4d90604a6660d665a3 100644 --- a/module/VuFind/src/VuFind/XSLT/Import/VuFind.php +++ b/module/VuFind/src/VuFind/XSLT/Import/VuFind.php @@ -62,7 +62,7 @@ class VuFind */ public static function getChangeTracker() { - return static::$serviceLocator->get('DbTablePluginManager') + return static::$serviceLocator->get('VuFind\DbTablePluginManager') ->get('ChangeTracker'); } diff --git a/module/VuFind/src/VuFindTest/Unit/DbTestCase.php b/module/VuFind/src/VuFindTest/Unit/DbTestCase.php index 4d1959da1330141931c1784bd710decd077bc5f7..08121c7f2e66337198c6a0a74d1a3ab0323e2f1f 100644 --- a/module/VuFind/src/VuFindTest/Unit/DbTestCase.php +++ b/module/VuFind/src/VuFindTest/Unit/DbTestCase.php @@ -51,7 +51,7 @@ abstract class DbTestCase extends TestCase $sm = parent::getServiceManager(); // Add database service: - if (!$sm->has('DbTablePluginManager')) { + if (!$sm->has('VuFind\DbTablePluginManager')) { $sm->setService('DBAdapter', \VuFind\Db\AdapterFactory::getAdapter()); $factory = new \VuFind\Db\Table\PluginManager( new \Zend\ServiceManager\Config( @@ -62,7 +62,7 @@ abstract class DbTestCase extends TestCase ) ); $factory->setServiceLocator($sm); - $sm->setService('DbTablePluginManager', $factory); + $sm->setService('VuFind\DbTablePluginManager', $factory); } return $sm; } @@ -77,6 +77,6 @@ abstract class DbTestCase extends TestCase public function getTable($table) { $sm = $this->getServiceManager(); - return $sm->get('DbTablePluginManager')->get($table); + return $sm->get('VuFind\DbTablePluginManager')->get($table); } } \ No newline at end of file diff --git a/module/VuFind/src/VuFindTest/Unit/TestCase.php b/module/VuFind/src/VuFindTest/Unit/TestCase.php index d8330504aa5ebe1acb65cd8338ab03778a5571ec..912d91909063168dfdc90c79eaf75274f7f90559 100644 --- a/module/VuFind/src/VuFindTest/Unit/TestCase.php +++ b/module/VuFind/src/VuFindTest/Unit/TestCase.php @@ -125,7 +125,7 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase ); $this->serviceManager = new \Zend\ServiceManager\ServiceManager(); $this->serviceManager->setService( - 'RecordDriverPluginManager', $recordDriverFactory + 'VuFind\RecordDriverPluginManager', $recordDriverFactory ); $this->serviceManager->setService( 'SearchSpecsReader', new \VuFind\Config\SearchSpecsReader() @@ -146,7 +146,7 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase public function getAuthManager() { $sm = $this->getServiceManager(); - if (!$sm->has('AuthPluginManager')) { + if (!$sm->has('VuFind\AuthPluginManager')) { $authManager = new \VuFind\Auth\PluginManager( new \Zend\ServiceManager\Config( array( @@ -164,9 +164,9 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase ) ); $authManager->setServiceLocator($sm); - $sm->setService('AuthPluginManager', $authManager); + $sm->setService('VuFind\AuthPluginManager', $authManager); } - return $sm->get('AuthPluginManager'); + return $sm->get('VuFind\AuthPluginManager'); } /** diff --git a/module/VuFindConsole/src/VuFindConsole/Controller/AbstractBase.php b/module/VuFindConsole/src/VuFindConsole/Controller/AbstractBase.php index 1a23b0988acf314868f77cd9f13b1ff7273858d9..324448d0ac3513c7dee4e682fa1a39bffa463e10 100644 --- a/module/VuFindConsole/src/VuFindConsole/Controller/AbstractBase.php +++ b/module/VuFindConsole/src/VuFindConsole/Controller/AbstractBase.php @@ -119,6 +119,7 @@ class AbstractBase extends AbstractActionController */ public function getTable($table) { - return $this->getServiceLocator()->get('DbTablePluginManager')->get($table); + return $this->getServiceLocator()->get('VuFind\DbTablePluginManager') + ->get($table); } } \ No newline at end of file