diff --git a/module/VuFind/src/VuFind/Bootstrapper.php b/module/VuFind/src/VuFind/Bootstrapper.php index af24bdf96c385443a93bd7df2fff671493159ebc..09f9bf203fdd63c31f75b350610a11029254aba9 100644 --- a/module/VuFind/src/VuFind/Bootstrapper.php +++ b/module/VuFind/src/VuFind/Bootstrapper.php @@ -444,7 +444,7 @@ class Bootstrapper { $callback = function ($event) { $sm = $event->getApplication()->getServiceManager(); - if ($sm->has('VuFind\Log\Logger')) { + if ($sm->has(\VuFind\Log\Logger::class)) { $log = $sm->get(\VuFind\Log\Logger::class); if (is_callable([$log, 'logException'])) { $exception = $event->getParam('exception'); diff --git a/module/VuFind/src/VuFind/RecordDriver/IlsAwareDelegatorFactory.php b/module/VuFind/src/VuFind/RecordDriver/IlsAwareDelegatorFactory.php index 6e5d2660f47acfca6602cc750d3676db02608ca4..32e92d25abac5c4d15fcfe6a84b0ce17a034cc0f 100644 --- a/module/VuFind/src/VuFind/RecordDriver/IlsAwareDelegatorFactory.php +++ b/module/VuFind/src/VuFind/RecordDriver/IlsAwareDelegatorFactory.php @@ -60,7 +60,7 @@ class IlsAwareDelegatorFactory implements DelegatorFactoryInterface // Attach the ILS if at least one backend supports it: $ilsBackends = $this->getIlsBackends($container); - if (!empty($ilsBackends) && $container->has('VuFind\ILS\Connection')) { + if (!empty($ilsBackends) && $container->has(\VuFind\ILS\Connection::class)) { $driver->attachILS( $container->get(\VuFind\ILS\Connection::class), $container->get(\VuFind\ILS\Logic\Holds::class), diff --git a/module/VuFind/src/VuFind/RecordDriver/PluginManager.php b/module/VuFind/src/VuFind/RecordDriver/PluginManager.php index ce4dda26805d94621c4ad41c28bcec660a42ed85..8e4dec28f94f4e921b0146c9ed192d81487df0e8 100644 --- a/module/VuFind/src/VuFind/RecordDriver/PluginManager.php +++ b/module/VuFind/src/VuFind/RecordDriver/PluginManager.php @@ -134,7 +134,7 @@ class PluginManager extends \VuFind\ServiceManager\AbstractPluginManager if ($hasHierarchyType && is_callable([$instance, 'setHierarchyDriverManager']) ) { - if ($sm && $sm->has('VuFind\Hierarchy\Driver\PluginManager')) { + if ($sm && $sm->has(\VuFind\Hierarchy\Driver\PluginManager::class)) { $instance->setHierarchyDriverManager( $sm->get(\VuFind\Hierarchy\Driver\PluginManager::class) ); diff --git a/module/VuFind/src/VuFind/Search/Factory/AbstractSolrBackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/AbstractSolrBackendFactory.php index fd90e3e284df815d74fea0fadce082fdf1968fdd..8e085df575c06425ca21bcf7b59f2893077eeb57 100644 --- a/module/VuFind/src/VuFind/Search/Factory/AbstractSolrBackendFactory.php +++ b/module/VuFind/src/VuFind/Search/Factory/AbstractSolrBackendFactory.php @@ -150,7 +150,7 @@ abstract class AbstractSolrBackendFactory implements FactoryInterface $this->serviceLocator = $sm; $this->config = $this->serviceLocator ->get(\VuFind\Config\PluginManager::class); - if ($this->serviceLocator->has('VuFind\Log\Logger')) { + if ($this->serviceLocator->has(\VuFind\Log\Logger::class)) { $this->logger = $this->serviceLocator->get(\VuFind\Log\Logger::class); } $connector = $this->createConnector(); @@ -351,7 +351,7 @@ abstract class AbstractSolrBackendFactory implements FactoryInterface if ($this->logger) { $connector->setLogger($this->logger); } - if ($this->serviceLocator->has('VuFindHttp\HttpService')) { + if ($this->serviceLocator->has(\VuFindHttp\HttpService::class)) { $connector->setProxy( $this->serviceLocator->get(\VuFindHttp\HttpService::class) ); diff --git a/module/VuFind/src/VuFind/Search/Factory/BrowZineBackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/BrowZineBackendFactory.php index b2edaaeec18e3d36519d5defc5ce677d25e28cf8..6e44b8aff1d309c2f32e61064b3b709ce7ec436e 100644 --- a/module/VuFind/src/VuFind/Search/Factory/BrowZineBackendFactory.php +++ b/module/VuFind/src/VuFind/Search/Factory/BrowZineBackendFactory.php @@ -86,7 +86,7 @@ class BrowZineBackendFactory implements FactoryInterface $configReader = $this->serviceLocator ->get(\VuFind\Config\PluginManager::class); $this->browzineConfig = $configReader->get('BrowZine'); - if ($this->serviceLocator->has('VuFind\Log\Logger')) { + if ($this->serviceLocator->has(\VuFind\Log\Logger::class)) { $this->logger = $this->serviceLocator->get(\VuFind\Log\Logger::class); } diff --git a/module/VuFind/src/VuFind/Search/Factory/EITBackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/EITBackendFactory.php index 492205e439935266f143cb552f5260cc03e9dd40..92e04b11744f3994a8795be8d7bd411ac713423c 100644 --- a/module/VuFind/src/VuFind/Search/Factory/EITBackendFactory.php +++ b/module/VuFind/src/VuFind/Search/Factory/EITBackendFactory.php @@ -87,7 +87,7 @@ class EITBackendFactory implements FactoryInterface $this->config = $this->serviceLocator ->get(\VuFind\Config\PluginManager::class) ->get('EIT'); - if ($this->serviceLocator->has('VuFind\Log\Logger')) { + if ($this->serviceLocator->has(\VuFind\Log\Logger::class)) { $this->logger = $this->serviceLocator->get(\VuFind\Log\Logger::class); } $connector = $this->createConnector(); diff --git a/module/VuFind/src/VuFind/Search/Factory/EdsBackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/EdsBackendFactory.php index 7213ca6c6fd08fc56f4bdc70682b7b257dd1fac0..bad7ffb6eaa197525d01712cc7c7881360961d2b 100644 --- a/module/VuFind/src/VuFind/Search/Factory/EdsBackendFactory.php +++ b/module/VuFind/src/VuFind/Search/Factory/EdsBackendFactory.php @@ -93,7 +93,7 @@ class EdsBackendFactory implements FactoryInterface $this->edsConfig = $this->serviceLocator ->get(\VuFind\Config\PluginManager::class) ->get('EDS'); - if ($this->serviceLocator->has('VuFind\Log\Logger')) { + if ($this->serviceLocator->has(\VuFind\Log\Logger::class)) { $this->logger = $this->serviceLocator->get(\VuFind\Log\Logger::class); } $connector = $this->createConnector(); diff --git a/module/VuFind/src/VuFind/Search/Factory/LibGuidesBackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/LibGuidesBackendFactory.php index 1bdc9f51d2c3a6781ab2e639314de0603960d122..8dc08eb7f78f39a4daecc86f7aa869131bb51f8b 100644 --- a/module/VuFind/src/VuFind/Search/Factory/LibGuidesBackendFactory.php +++ b/module/VuFind/src/VuFind/Search/Factory/LibGuidesBackendFactory.php @@ -86,7 +86,7 @@ class LibGuidesBackendFactory implements FactoryInterface $configReader = $this->serviceLocator ->get(\VuFind\Config\PluginManager::class); $this->libGuidesConfig = $configReader->get('LibGuides'); - if ($this->serviceLocator->has('VuFind\Log\Logger')) { + if ($this->serviceLocator->has(\VuFind\Log\Logger::class)) { $this->logger = $this->serviceLocator->get(\VuFind\Log\Logger::class); } $connector = $this->createConnector(); diff --git a/module/VuFind/src/VuFind/Search/Factory/Pazpar2BackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/Pazpar2BackendFactory.php index 9adbdb3fe2d1c9a97bada8095a84c8d8bdd61d4b..c73e00691ecb0a7c86a191d9a5aed2194a5bb69a 100644 --- a/module/VuFind/src/VuFind/Search/Factory/Pazpar2BackendFactory.php +++ b/module/VuFind/src/VuFind/Search/Factory/Pazpar2BackendFactory.php @@ -88,7 +88,7 @@ class Pazpar2BackendFactory implements FactoryInterface $this->config = $this->serviceLocator ->get(\VuFind\Config\PluginManager::class) ->get('Pazpar2'); - if ($this->serviceLocator->has('VuFind\Log\Logger')) { + if ($this->serviceLocator->has(\VuFind\Log\Logger::class)) { $this->logger = $this->serviceLocator->get(\VuFind\Log\Logger::class); } $connector = $this->createConnector(); diff --git a/module/VuFind/src/VuFind/Search/Factory/PrimoBackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/PrimoBackendFactory.php index 521965c021f8758651f29e0de747d08a2d505a3f..387e9a1fa269358ec5fc62afcb4f31faa78558eb 100644 --- a/module/VuFind/src/VuFind/Search/Factory/PrimoBackendFactory.php +++ b/module/VuFind/src/VuFind/Search/Factory/PrimoBackendFactory.php @@ -91,7 +91,7 @@ class PrimoBackendFactory implements FactoryInterface $configReader = $this->serviceLocator ->get(\VuFind\Config\PluginManager::class); $this->primoConfig = $configReader->get('Primo'); - if ($this->serviceLocator->has('VuFind\Log\Logger')) { + if ($this->serviceLocator->has(\VuFind\Log\Logger::class)) { $this->logger = $this->serviceLocator->get(\VuFind\Log\Logger::class); } diff --git a/module/VuFind/src/VuFind/Search/Factory/SummonBackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/SummonBackendFactory.php index 73cd064b5d0f5f51aeb11bceed052d27414be9ba..74115c411a5a5e5d83fd96acc10456d613fdd41e 100644 --- a/module/VuFind/src/VuFind/Search/Factory/SummonBackendFactory.php +++ b/module/VuFind/src/VuFind/Search/Factory/SummonBackendFactory.php @@ -95,7 +95,7 @@ class SummonBackendFactory implements FactoryInterface ->get(\VuFind\Config\PluginManager::class); $this->config = $configReader->get('config'); $this->summonConfig = $configReader->get('Summon'); - if ($this->serviceLocator->has('VuFind\Log\Logger')) { + if ($this->serviceLocator->has(\VuFind\Log\Logger::class)) { $this->logger = $this->serviceLocator->get(\VuFind\Log\Logger::class); } $connector = $this->createConnector(); diff --git a/module/VuFind/src/VuFind/Search/Factory/WorldCatBackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/WorldCatBackendFactory.php index 4cfa0e7bd05467bf721d180734d818254fbd515c..4874a7fc33b75e81ec01fc524089cd89003b1130 100644 --- a/module/VuFind/src/VuFind/Search/Factory/WorldCatBackendFactory.php +++ b/module/VuFind/src/VuFind/Search/Factory/WorldCatBackendFactory.php @@ -95,7 +95,7 @@ class WorldCatBackendFactory implements FactoryInterface ->get('config'); $this->wcConfig = $this->serviceLocator ->get(\VuFind\Config\PluginManager::class)->get('WorldCat'); - if ($this->serviceLocator->has('VuFind\Log\Logger')) { + if ($this->serviceLocator->has(\VuFind\Log\Logger::class)) { $this->logger = $this->serviceLocator->get(\VuFind\Log\Logger::class); } $connector = $this->createConnector(); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/HelpTextFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/HelpTextFactory.php index ded2534fc12eddef9e6928204869d1b56842e0b0..f9fb0b4c5879430bf2dd4a53f0e9869f611be508 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/HelpTextFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/HelpTextFactory.php @@ -61,7 +61,7 @@ class HelpTextFactory implements FactoryInterface if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); } - $lang = $container->has('Zend\Mvc\I18n\Translator') + $lang = $container->has(\Zend\Mvc\I18n\Translator::class) ? $container->get(\Zend\Mvc\I18n\Translator::class)->getLocale() : 'en'; $helpers = $container->get('ViewHelperManager'); diff --git a/module/VuFind/src/VuFindTest/Unit/DbTestCase.php b/module/VuFind/src/VuFindTest/Unit/DbTestCase.php index c9669be1f7e674e1e68c6ba98ef0439f02155f0a..5f288fd53ae524b659e3651e03db8022694b7d28 100644 --- a/module/VuFind/src/VuFindTest/Unit/DbTestCase.php +++ b/module/VuFind/src/VuFindTest/Unit/DbTestCase.php @@ -105,7 +105,7 @@ abstract class DbTestCase extends TestCase $sm = parent::getServiceManager(); // Add database service: - if (!$sm->has('VuFind\Db\Table\PluginManager')) { + if (!$sm->has(\VuFind\Db\Table\PluginManager::class)) { $dbFactory = new \VuFind\Db\AdapterFactory( $sm->get(\VuFind\Config\PluginManager::class)->get('config') ); diff --git a/module/VuFind/src/VuFindTest/Unit/TestCase.php b/module/VuFind/src/VuFindTest/Unit/TestCase.php index 2a06288c2cf6d118393dc1de7e0a6be837ccabc8..3dd9ff53eef41bea5a587a9f056cc2bc9301b3f7 100644 --- a/module/VuFind/src/VuFindTest/Unit/TestCase.php +++ b/module/VuFind/src/VuFindTest/Unit/TestCase.php @@ -226,7 +226,7 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase public function getAuthManager() { $sm = $this->getServiceManager(); - if (!$sm->has('VuFind\Auth\PluginManager')) { + if (!$sm->has(\VuFind\Auth\PluginManager::class)) { $authManager = new \VuFind\Auth\PluginManager($sm); $sm->setService('VuFind\Auth\PluginManager', $authManager); }