Skip to content
Snippets Groups Projects
Commit cfd5504e authored by David Maus's avatar David Maus
Browse files

Initialize BackendManager in central Bootstrapper

parent a3d95b7d
No related merge requests found
...@@ -346,6 +346,26 @@ class Bootstrapper ...@@ -346,6 +346,26 @@ class Bootstrapper
$this->events->attach('dispatch.error', $callback); $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. * Set up logging.
* *
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment