diff --git a/module/VuFind/config/module.config.php b/module/VuFind/config/module.config.php index 5a95f0c0fb19221491c65d29484ad1f2eac6ac2f..5789c763021838cb5d4b036e4d4f00c3d7ec7290 100644 --- a/module/VuFind/config/module.config.php +++ b/module/VuFind/config/module.config.php @@ -321,7 +321,7 @@ $config = [ 'VuFind\Recaptcha' => 'VuFind\Service\Factory::getRecaptcha', 'VuFind\Recommend\PluginManager' => 'VuFind\ServiceManager\AbstractPluginManagerFactory', 'VuFind\RecordCache' => 'VuFind\Service\Factory::getRecordCache', - 'VuFind\RecordDriverPluginManager' => 'VuFind\Service\Factory::getRecordDriverPluginManager', + 'VuFind\RecordDriver\PluginManager' => 'VuFind\ServiceManager\AbstractPluginManagerFactory', 'VuFind\RecordLoader' => 'VuFind\Service\Factory::getRecordLoader', 'VuFind\RecordRouter' => 'VuFind\Service\Factory::getRecordRouter', 'VuFind\RecordTabPluginManager' => 'VuFind\Service\Factory::getRecordTabPluginManager', @@ -388,6 +388,7 @@ $config = [ 'VuFind\ILSDriverPluginManager' => 'VuFind\ILS\Driver\PluginManager', 'VuFind\IpAddressUtils' => 'VuFind\Net\IpAddressUtils', 'VuFind\RecommendPluginManager' => 'VuFind\Recommend\PluginManager', + 'VuFind\RecordDriverPluginManager' => 'VuFind\RecordDriver\PluginManager', ], ], 'translator' => [], diff --git a/module/VuFind/src/VuFind/Search/Factory/BrowZineBackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/BrowZineBackendFactory.php index 2ed515288dc6db1493c3f60762967c0836ff71a6..99a405a0ebaf8787a5d2b64353c3b1799dc6671b 100644 --- a/module/VuFind/src/VuFind/Search/Factory/BrowZineBackendFactory.php +++ b/module/VuFind/src/VuFind/Search/Factory/BrowZineBackendFactory.php @@ -158,7 +158,7 @@ class BrowZineBackendFactory implements FactoryInterface */ protected function createRecordCollectionFactory() { - $manager = $this->serviceLocator->get('VuFind\RecordDriverPluginManager'); + $manager = $this->serviceLocator->get('VuFind\RecordDriver\PluginManager'); $callback = function ($data) use ($manager) { $driver = $manager->get('BrowZine'); $driver->setRawData($data); diff --git a/module/VuFind/src/VuFind/Search/Factory/EITBackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/EITBackendFactory.php index 2a4b82eddf24dcec1a775f2dacb4c6ac1e57a57b..f31ee096246ded84a2332794d134912c6ea629f1 100644 --- a/module/VuFind/src/VuFind/Search/Factory/EITBackendFactory.php +++ b/module/VuFind/src/VuFind/Search/Factory/EITBackendFactory.php @@ -149,7 +149,7 @@ class EITBackendFactory implements FactoryInterface */ protected function createRecordCollectionFactory() { - $manager = $this->serviceLocator->get('VuFind\RecordDriverPluginManager'); + $manager = $this->serviceLocator->get('VuFind\RecordDriver\PluginManager'); $callback = function ($data) use ($manager) { $driver = $manager->get('EIT'); $driver->setRawData($data); diff --git a/module/VuFind/src/VuFind/Search/Factory/EdsBackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/EdsBackendFactory.php index b4010f514cbc994e52ad6f7df647b8382b91e26d..a8ada0c7e8b38b70cb3a49e1d7ff4c80fa07e65d 100644 --- a/module/VuFind/src/VuFind/Search/Factory/EdsBackendFactory.php +++ b/module/VuFind/src/VuFind/Search/Factory/EdsBackendFactory.php @@ -163,7 +163,7 @@ class EdsBackendFactory implements FactoryInterface */ protected function createRecordCollectionFactory() { - $manager = $this->serviceLocator->get('VuFind\RecordDriverPluginManager'); + $manager = $this->serviceLocator->get('VuFind\RecordDriver\PluginManager'); $callback = function ($data) use ($manager) { $driver = $manager->get('EDS'); $driver->setRawData($data); diff --git a/module/VuFind/src/VuFind/Search/Factory/LibGuidesBackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/LibGuidesBackendFactory.php index 36cc2d39060dc183871ebc9f9bfa219b23be5eee..593b76ce39b1846058886df1ede2e58293f04df0 100644 --- a/module/VuFind/src/VuFind/Search/Factory/LibGuidesBackendFactory.php +++ b/module/VuFind/src/VuFind/Search/Factory/LibGuidesBackendFactory.php @@ -156,7 +156,7 @@ class LibGuidesBackendFactory implements FactoryInterface */ protected function createRecordCollectionFactory() { - $manager = $this->serviceLocator->get('VuFind\RecordDriverPluginManager'); + $manager = $this->serviceLocator->get('VuFind\RecordDriver\PluginManager'); $callback = function ($data) use ($manager) { $driver = $manager->get('LibGuides'); $driver->setRawData($data); diff --git a/module/VuFind/src/VuFind/Search/Factory/Pazpar2BackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/Pazpar2BackendFactory.php index 7aa9a5724028303dd1e71bc9853efc4a299451d2..af53ca5bada42c0221ee5a518e10aa261c63682e 100644 --- a/module/VuFind/src/VuFind/Search/Factory/Pazpar2BackendFactory.php +++ b/module/VuFind/src/VuFind/Search/Factory/Pazpar2BackendFactory.php @@ -148,7 +148,7 @@ class Pazpar2BackendFactory implements FactoryInterface */ protected function createRecordCollectionFactory() { - $manager = $this->serviceLocator->get('VuFind\RecordDriverPluginManager'); + $manager = $this->serviceLocator->get('VuFind\RecordDriver\PluginManager'); $callback = function ($data) use ($manager) { $driver = $manager->get('Pazpar2'); $driver->setRawData($data); diff --git a/module/VuFind/src/VuFind/Search/Factory/PrimoBackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/PrimoBackendFactory.php index 980cbbb525c99a6c04651b72d9024cacbd3bfd34..2722a69144c228cbaf12eadc543bab725277ab07 100644 --- a/module/VuFind/src/VuFind/Search/Factory/PrimoBackendFactory.php +++ b/module/VuFind/src/VuFind/Search/Factory/PrimoBackendFactory.php @@ -177,7 +177,7 @@ class PrimoBackendFactory implements FactoryInterface */ protected function createRecordCollectionFactory() { - $manager = $this->serviceLocator->get('VuFind\RecordDriverPluginManager'); + $manager = $this->serviceLocator->get('VuFind\RecordDriver\PluginManager'); $callback = function ($data) use ($manager) { $driver = $manager->get('Primo'); $driver->setRawData($data); diff --git a/module/VuFind/src/VuFind/Search/Factory/SolrAuthBackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/SolrAuthBackendFactory.php index 108c4458d41128c838dd7d4d796544e836f69ef8..4cd87c370747f6cb633e87b406197f3e965d26ce 100644 --- a/module/VuFind/src/VuFind/Search/Factory/SolrAuthBackendFactory.php +++ b/module/VuFind/src/VuFind/Search/Factory/SolrAuthBackendFactory.php @@ -64,7 +64,7 @@ class SolrAuthBackendFactory extends AbstractSolrBackendFactory protected function createBackend(Connector $connector) { $backend = parent::createBackend($connector); - $manager = $this->serviceLocator->get('VuFind\RecordDriverPluginManager'); + $manager = $this->serviceLocator->get('VuFind\RecordDriver\PluginManager'); $callback = function ($data) use ($manager) { $driver = $manager->get('SolrAuth'); $driver->setRawData($data); diff --git a/module/VuFind/src/VuFind/Search/Factory/SolrDefaultBackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/SolrDefaultBackendFactory.php index b49adcdc707423a2412756a3e48e7b54666fd218..0ce8c1721f512255467fa026c363062027fd5265 100644 --- a/module/VuFind/src/VuFind/Search/Factory/SolrDefaultBackendFactory.php +++ b/module/VuFind/src/VuFind/Search/Factory/SolrDefaultBackendFactory.php @@ -76,7 +76,7 @@ class SolrDefaultBackendFactory extends AbstractSolrBackendFactory protected function createBackend(Connector $connector) { $backend = parent::createBackend($connector); - $manager = $this->serviceLocator->get('VuFind\RecordDriverPluginManager'); + $manager = $this->serviceLocator->get('VuFind\RecordDriver\PluginManager'); $factory = new RecordCollectionFactory([$manager, 'getSolrRecord']); $backend->setRecordCollectionFactory($factory); return $backend; diff --git a/module/VuFind/src/VuFind/Search/Factory/SolrReservesBackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/SolrReservesBackendFactory.php index 79b855622abec634cd1d1a983ece80f6503eab78..393c0539b7ee2ec1e1ce84b5b4c8f928311ed949 100644 --- a/module/VuFind/src/VuFind/Search/Factory/SolrReservesBackendFactory.php +++ b/module/VuFind/src/VuFind/Search/Factory/SolrReservesBackendFactory.php @@ -64,7 +64,7 @@ class SolrReservesBackendFactory extends AbstractSolrBackendFactory protected function createBackend(Connector $connector) { $backend = parent::createBackend($connector); - $manager = $this->serviceLocator->get('VuFind\RecordDriverPluginManager'); + $manager = $this->serviceLocator->get('VuFind\RecordDriver\PluginManager'); $callback = function ($data) use ($manager) { $driver = $manager->get('SolrReserves'); $driver->setRawData($data); diff --git a/module/VuFind/src/VuFind/Search/Factory/SolrWebBackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/SolrWebBackendFactory.php index 8d7b4b91456c9779228ac4f1518a925c29d29f91..030c8d816c3bb2f88c6814770f2f55bbad082591 100644 --- a/module/VuFind/src/VuFind/Search/Factory/SolrWebBackendFactory.php +++ b/module/VuFind/src/VuFind/Search/Factory/SolrWebBackendFactory.php @@ -89,7 +89,7 @@ class SolrWebBackendFactory extends AbstractSolrBackendFactory protected function createBackend(Connector $connector) { $backend = parent::createBackend($connector); - $manager = $this->serviceLocator->get('VuFind\RecordDriverPluginManager'); + $manager = $this->serviceLocator->get('VuFind\RecordDriver\PluginManager'); $callback = function ($data) use ($manager) { $driver = $manager->get('SolrWeb'); $driver->setRawData($data); diff --git a/module/VuFind/src/VuFind/Search/Factory/SummonBackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/SummonBackendFactory.php index 71cab74fc00a2c2aca7476ab4fec8381fa1cea4c..2464eb72997231191d75931c645cf1356fafec49 100644 --- a/module/VuFind/src/VuFind/Search/Factory/SummonBackendFactory.php +++ b/module/VuFind/src/VuFind/Search/Factory/SummonBackendFactory.php @@ -177,7 +177,7 @@ class SummonBackendFactory implements FactoryInterface */ protected function createRecordCollectionFactory() { - $manager = $this->serviceLocator->get('VuFind\RecordDriverPluginManager'); + $manager = $this->serviceLocator->get('VuFind\RecordDriver\PluginManager'); $stripSnippets = !isset($this->summonConfig->General->snippets) || !$this->summonConfig->General->snippets; $callback = function ($data) use ($manager, $stripSnippets) { diff --git a/module/VuFind/src/VuFind/Search/Factory/WorldCatBackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/WorldCatBackendFactory.php index 384ad1c62d58c6b7e6cac523884d0e06665b4220..f62b6d153ca52fc8fbeb98204b4e791cdbace022 100644 --- a/module/VuFind/src/VuFind/Search/Factory/WorldCatBackendFactory.php +++ b/module/VuFind/src/VuFind/Search/Factory/WorldCatBackendFactory.php @@ -156,7 +156,7 @@ class WorldCatBackendFactory implements FactoryInterface */ protected function createRecordCollectionFactory() { - $manager = $this->serviceLocator->get('VuFind\RecordDriverPluginManager'); + $manager = $this->serviceLocator->get('VuFind\RecordDriver\PluginManager'); $callback = function ($data) use ($manager) { $driver = $manager->get('WorldCat'); $driver->setRawData($data); diff --git a/module/VuFind/src/VuFind/Service/Factory.php b/module/VuFind/src/VuFind/Service/Factory.php index 59a2ad1ba6d843f4324ba71e5f86d9146e8640bd..1afc598bf4d8b0c7660dc988d1cfdfa874b572b6 100644 --- a/module/VuFind/src/VuFind/Service/Factory.php +++ b/module/VuFind/src/VuFind/Service/Factory.php @@ -236,24 +236,12 @@ class Factory public static function getRecordCache(ServiceManager $sm) { return new \VuFind\Record\Cache( - $sm->get('VuFind\RecordDriverPluginManager'), + $sm->get('VuFind\RecordDriver\PluginManager'), $sm->get('VuFind\Config\PluginManager')->get('RecordCache'), $sm->get('VuFind\Db\Table\PluginManager')->get('Record') ); } - /** - * Construct the RecordDriver Plugin Manager. - * - * @param ServiceManager $sm Service manager. - * - * @return \VuFind\RecordDriver\PluginManager - */ - public static function getRecordDriverPluginManager(ServiceManager $sm) - { - return static::getGenericPluginManager($sm, 'RecordDriver'); - } - /** * Construct the record loader. * @@ -265,7 +253,7 @@ class Factory { return new \VuFind\Record\Loader( $sm->get('VuFind\Search'), - $sm->get('VuFind\RecordDriverPluginManager'), + $sm->get('VuFind\RecordDriver\PluginManager'), $sm->get('VuFind\RecordCache') ); } diff --git a/module/VuFind/src/VuFindTest/Unit/TestCase.php b/module/VuFind/src/VuFindTest/Unit/TestCase.php index 92a44df44fef1e6066cd16cc236e2243282ae055..508eca3a2bde8488218baef983f1ca6de6328f76 100644 --- a/module/VuFind/src/VuFindTest/Unit/TestCase.php +++ b/module/VuFind/src/VuFindTest/Unit/TestCase.php @@ -179,7 +179,7 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase ] ); $this->serviceManager->setService( - 'VuFind\RecordDriverPluginManager', $recordDriverFactory + 'VuFind\RecordDriver\PluginManager', $recordDriverFactory ); $this->serviceManager->setService( 'VuFind\SearchSpecsReader', new \VuFind\Config\SearchSpecsReader() @@ -202,7 +202,7 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase $this->serviceManager->setService( 'VuFind\RecordLoader', new \VuFind\Record\Loader( $this->serviceManager->get('VuFind\Search'), - $this->serviceManager->get('VuFind\RecordDriverPluginManager') + $this->serviceManager->get('VuFind\RecordDriver\PluginManager') ) ); $this->serviceManager->setService('Config', []);