diff --git a/module/VuDL/config/module.config.php b/module/VuDL/config/module.config.php index db271ba6c473e44eba436e72302f4f559cdc9a19..99c7a68996b6721cb2ac0c2d5d488fd0f7a1b5a1 100644 --- a/module/VuDL/config/module.config.php +++ b/module/VuDL/config/module.config.php @@ -18,17 +18,7 @@ $config = array( 'plugin_managers' => array( 'recorddriver' => array( 'factories' => array( - 'solrvudl' => function ($sm) { - $driver = new \VuDL\RecordDriver\SolrVudl( - $sm->getServiceLocator()->get('VuFind\Config')->get('config'), - null, - $sm->getServiceLocator()->get('VuFind\Config')->get('searches') - ); - $driver->setVuDLConfig( - $sm->getServiceLocator()->get('VuFind\Config')->get('VuDL') - ); - return $driver; - } + 'solrvudl' => array('VuDL\Factory', 'getRecordDriver'), ) ) ) diff --git a/module/VuDL/src/VuDL/Factory.php b/module/VuDL/src/VuDL/Factory.php index 9d1b3afddd6a529876981d73a71716a649789a9c..bed537351102c3fcb3f3d5d2c5773cd746e598a6 100644 --- a/module/VuDL/src/VuDL/Factory.php +++ b/module/VuDL/src/VuDL/Factory.php @@ -49,10 +49,10 @@ class Factory public static function getConnectionManager(ServiceManager $sm) { return new \VuDL\Connection\Manager( - array('Solr', 'Fedora'), $sm - ); + array('Solr', 'Fedora'), $sm + ); } - + /** * Construct the Connection Fedora service. * @@ -62,11 +62,11 @@ class Factory */ public static function getConnectionFedora(ServiceManager $sm) { - return new \VuDL\Connection\Fedora( - $sm->get('VuFind\Config')->get('VuDL') - ); + return new \VuDL\Connection\Fedora( + $sm->get('VuFind\Config')->get('VuDL') + ); } - + /** * Construct the Connection Solr service. * @@ -76,10 +76,10 @@ class Factory */ public static function getConnectionSolr(ServiceManager $sm) { - return new \VuDL\Connection\Solr( - $sm->get('VuFind\Config')->get('VuDL'), - $sm->get('VuFind\Search\BackendManager')->get('Solr') - ); + return new \VuDL\Connection\Solr( + $sm->get('VuFind\Config')->get('VuDL'), + $sm->get('VuFind\Search\BackendManager')->get('Solr') + ); } /**