From 2561006b472bd23310ab3b1b4050731afd711898 Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Thu, 6 Sep 2012 09:18:33 -0400 Subject: [PATCH] Renamed "handler_manager" to "plugin_manager" -- more accurate description for service locators. --- module/VuFind/config/module.config.php | 8 ++++---- module/VuFind/src/VuFind/Auth/Manager.php | 2 +- module/VuFind/src/VuFind/Bootstrap.php | 8 ++++---- module/VuFind/src/VuFind/Controller/AjaxController.php | 4 ++-- module/VuFind/src/VuFind/Controller/SearchController.php | 2 +- module/VuFind/src/VuFind/Search/Base/Params.php | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/module/VuFind/config/module.config.php b/module/VuFind/config/module.config.php index 5b3d69b1679..a43dc88f410 100644 --- a/module/VuFind/config/module.config.php +++ b/module/VuFind/config/module.config.php @@ -60,7 +60,7 @@ $config = array( ) ), ), - 'auth_handler_manager' => array( + 'auth_plugin_manager' => array( 'abstract_factories' => array('VuFind\Auth\PluginFactory'), 'invokables' => array( 'database' => 'VuFind\Auth\Database', @@ -76,7 +76,7 @@ $config = array( 'sip' => 'Sip2', ), ), - 'autocomplete_handler_manager' => array( + 'autocomplete_plugin_manager' => array( 'abstract_factories' => array('VuFind\Autocomplete\PluginFactory'), 'invokables' => array( 'none' => 'VuFind\Autocomplete\None', @@ -138,7 +138,7 @@ $config = array( 'result-scroller' => 'VuFind\Controller\Plugin\ResultScroller', ) ), - 'recommend_handler_manager' => array( + 'recommend_plugin_manager' => array( 'abstract_factories' => array('VuFind\Recommend\PluginFactory'), 'invokables' => array( 'authorfacets' => 'VuFind\Recommend\AuthorFacets', @@ -176,7 +176,7 @@ $config = array( 'sessionmanager' => 'Zend\Session\SessionManager', ) ), - 'session_handler_manager' => array( + 'session_plugin_manager' => array( 'abstract_factories' => array('VuFind\Session\PluginFactory'), 'invokables' => array( 'database' => 'VuFind\Session\Database', diff --git a/module/VuFind/src/VuFind/Auth/Manager.php b/module/VuFind/src/VuFind/Auth/Manager.php index 1ee745a40f0..5b7c9de23bb 100644 --- a/module/VuFind/src/VuFind/Auth/Manager.php +++ b/module/VuFind/src/VuFind/Auth/Manager.php @@ -67,7 +67,7 @@ class Manager implements ServiceLocatorAwareInterface protected function getAuth() { if (!$this->auth) { - $manager = $this->getServiceLocator()->get('AuthHandlerManager'); + $manager = $this->getServiceLocator()->get('AuthPluginManager'); $this->auth = $manager->get($this->config->Authentication->method); $this->auth->setConfig($this->config); } diff --git a/module/VuFind/src/VuFind/Bootstrap.php b/module/VuFind/src/VuFind/Bootstrap.php index ea4de4c9136..99b1257c46d 100644 --- a/module/VuFind/src/VuFind/Bootstrap.php +++ b/module/VuFind/src/VuFind/Bootstrap.php @@ -92,9 +92,9 @@ class Bootstrap // Use naming conventions to set up a bunch of services based on namespace: $namespaces = array('Auth', 'Autocomplete', 'Recommend', 'Session'); foreach ($namespaces as $ns) { - $serviceName = $ns . 'HandlerManager'; + $serviceName = $ns . 'PluginManager'; $className = 'VuFind\\' . $ns . '\PluginManager'; - $configKey = strtolower($ns) . '_handler_manager'; + $configKey = strtolower($ns) . '_plugin_manager'; $service = new $className( new ServiceManagerConfig($config[$configKey]) ); @@ -144,8 +144,8 @@ class Bootstrap // manager and injecting appropriate dependencies: $serviceManager = $this->event->getApplication()->getServiceManager(); $sessionManager = $serviceManager->get('SessionManager'); - $sessionHandlerManager = $serviceManager->get('SessionHandlerManager'); - $sessionHandler = $sessionHandlerManager->get($this->config->Session->type); + $sessionPluginManager = $serviceManager->get('SessionPluginManager'); + $sessionHandler = $sessionPluginManager->get($this->config->Session->type); $sessionHandler->setConfig($this->config->Session); $sessionManager->setSaveHandler($sessionHandler); diff --git a/module/VuFind/src/VuFind/Controller/AjaxController.php b/module/VuFind/src/VuFind/Controller/AjaxController.php index ce70a91216d..343889fac9d 100644 --- a/module/VuFind/src/VuFind/Controller/AjaxController.php +++ b/module/VuFind/src/VuFind/Controller/AjaxController.php @@ -108,7 +108,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()->setSearchClassId('Solr'); - $rm = $this->getServiceLocator()->get('RecommendHandlerManager'); + $rm = $this->getServiceLocator()->get('RecommendPluginManager'); $module = clone($rm->get($this->params()->fromQuery('mod'))); $module->setConfig($this->params()->fromQuery('params')); $params = $sm->getParams(); @@ -924,7 +924,7 @@ class AjaxController extends AbstractBase { $query = $this->getRequest()->getQuery(); $autocompleteManager = $this->getServiceLocator() - ->get('AutocompleteHandlerManager'); + ->get('AutocompletePluginManager'); return $this->output( $autocompleteManager->getSuggestions($query), self::STATUS_OK ); diff --git a/module/VuFind/src/VuFind/Controller/SearchController.php b/module/VuFind/src/VuFind/Controller/SearchController.php index 05be63182b1..2dea03953a3 100644 --- a/module/VuFind/src/VuFind/Controller/SearchController.php +++ b/module/VuFind/src/VuFind/Controller/SearchController.php @@ -569,7 +569,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('AutocompleteHandlerManager'); + ->get('AutocompletePluginManager'); $suggestions = $autocompleteManager->getSuggestions( $query, 'type', 'lookfor' ); diff --git a/module/VuFind/src/VuFind/Search/Base/Params.php b/module/VuFind/src/VuFind/Search/Base/Params.php index 171bcdd26e7..a9558886bb3 100644 --- a/module/VuFind/src/VuFind/Search/Base/Params.php +++ b/module/VuFind/src/VuFind/Search/Base/Params.php @@ -796,10 +796,10 @@ class Params implements ServiceLocatorAwareInterface // Get the plugin manager (skip recommendations if it is unavailable): $sm = $this->getServiceLocator(); - if (!is_object($sm) || !$sm->has('RecommendHandlerManager')) { + if (!is_object($sm) || !$sm->has('RecommendPluginManager')) { return; } - $manager = $sm->get('RecommendHandlerManager'); + $manager = $sm->get('RecommendPluginManager'); // Process recommendations for each location: $this->recommend = array( -- GitLab