diff --git a/module/VuFind/src/VuFind/Bootstrapper.php b/module/VuFind/src/VuFind/Bootstrapper.php index 918d717855e3882763e4eb37425833a553170d2e..801f0a269bdc84115c955f278e41981000dbd721 100644 --- a/module/VuFind/src/VuFind/Bootstrapper.php +++ b/module/VuFind/src/VuFind/Bootstrapper.php @@ -346,6 +346,26 @@ class Bootstrapper $this->events->attach('dispatch.error', $callback); } + protected function initSearch () + { + $sm = $this->event->getApplication()->getServiceManager(); + + /// Hardcoded for now + $config = array( + 'factories' => array( + 'biblio' => 'VuFind\Search\Factory\SolrDefaultBackendFactory' + ) + ); + + $registry = $sm->createScopedServiceManager(); + $smConfig = new \Zend\ServiceManager\Config($config); + $smConfig->configureServiceManager($registry); + $bm = new \VuFind\Search\BackendManager($registry); + + $events = $sm->get('SharedEventManager'); + $events->attach('VuFind\Search', 'resolve', array($bm, 'onResolve')); + } + /** * Set up logging. *