Esempio n. 1
0
 /**
  * @inheritDoc
  */
 public function canCreateServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName)
 {
     /** @var ExtendedSolrFactoryHelper $extendedTargetHelper */
     $extendedTargetHelper = $serviceLocator->getServiceLocator()->get('Swissbib\\ExtendedSolrFactoryHelper');
     $this->defaultNamespace = $extendedTargetHelper->getNamespace($name, $requestedName);
     return parent::canCreateServiceWithName($serviceLocator, $name, $requestedName);
 }
Esempio n. 2
0
 /**
  * Create a service for the specified name.
  *
  * @param ServiceLocatorInterface $serviceLocator Service locator
  * @param string                  $name           Name of service
  * @param string                  $requestedName  Unfiltered name of service
  *
  * @return object
  */
 public function createServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName)
 {
     if ($name === 'favorites') {
         return new \Finna\Search\Favorites\Options($serviceLocator->getServiceLocator()->get('VuFind\\Config'));
     }
     return parent::createServiceWithName($serviceLocator, $name, $requestedName);
 }
Esempio n. 3
0
 /**
  * Create a service for the specified name.
  *
  * @param ServiceLocatorInterface $serviceLocator Service locator
  * @param string                  $name           Name of service
  * @param string                  $requestedName  Unfiltered name of service
  *
  * @return object
  */
 public function createServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName)
 {
     if ($name === 'favorites') {
         return new \Finna\Search\Favorites\Options($serviceLocator->getServiceLocator()->get('VuFind\\Config'));
     } else {
         if ($name == 'solr' || $name == 'metalib' || $name == 'combined') {
             $this->defaultNamespace = 'Finna\\Search';
             $class = $this->getClassName($name, $requestedName);
             return new $class($serviceLocator->getServiceLocator()->get('VuFind\\Config'));
         }
     }
     return parent::createServiceWithName($serviceLocator, $name, $requestedName);
 }