Exemple #1
0
 protected function loadAdapters()
 {
     foreach ($this->moduleOptions->getAdapters() as $adapter) {
         if (!isset($this->adapters[$adapter])) {
             $this->adapters[$adapter] = $this->serviceLocator->get($adapter);
             if (!$this->adapters[$adapter] instanceof Adapter\AdapterInterface) {
                 throw new Exception\RuntimeException(sprintf('%s does not implement AdapterInterface', get_class($this->adapters[$adapter])));
             }
         }
     }
 }
Exemple #2
0
 /**
  * @param ServerUrl     $serverUrlHelper
  * @param ModuleOptions $moduleOptions
  */
 protected function injectServerUrl(ServerUrl $serverUrlHelper, ModuleOptions $moduleOptions)
 {
     $options = parse_url($moduleOptions->getLocation());
     $serverUrlHelper->setScheme($options['scheme']);
     $serverUrlHelper->setHost($options['host']);
 }