Loading src/UnicaenAuth/Options/ModuleOptionsFactory.php +5 −8 Original line number Diff line number Diff line Loading @@ -4,26 +4,23 @@ namespace UnicaenAuth\Options; use Assert\Assertion; use Assert\AssertionFailedException; use Interop\Container\ContainerInterface; use UnicaenApp\Exception\RuntimeException; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; /** * Description of ModuleOptionsFactory * * @author Bertrand GAUTHIER <bertrand.gauthier at unicaen.fr> */ class ModuleOptionsFactory implements FactoryInterface class ModuleOptionsFactory { /** * Create service * * @param ServiceLocatorInterface $serviceLocator * @param ContainerInterface $container * @return mixed */ public function createService(ServiceLocatorInterface $serviceLocator) public function __invoke(ContainerInterface $container) { $config = $serviceLocator->get('Configuration'); $config = $container->get('Configuration'); $moduleConfig = isset($config['unicaen-auth']) ? $config['unicaen-auth'] : []; $moduleConfig = array_merge($config['zfcuser'], $moduleConfig); Loading Loading
src/UnicaenAuth/Options/ModuleOptionsFactory.php +5 −8 Original line number Diff line number Diff line Loading @@ -4,26 +4,23 @@ namespace UnicaenAuth\Options; use Assert\Assertion; use Assert\AssertionFailedException; use Interop\Container\ContainerInterface; use UnicaenApp\Exception\RuntimeException; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; /** * Description of ModuleOptionsFactory * * @author Bertrand GAUTHIER <bertrand.gauthier at unicaen.fr> */ class ModuleOptionsFactory implements FactoryInterface class ModuleOptionsFactory { /** * Create service * * @param ServiceLocatorInterface $serviceLocator * @param ContainerInterface $container * @return mixed */ public function createService(ServiceLocatorInterface $serviceLocator) public function __invoke(ContainerInterface $container) { $config = $serviceLocator->get('Configuration'); $config = $container->get('Configuration'); $moduleConfig = isset($config['unicaen-auth']) ? $config['unicaen-auth'] : []; $moduleConfig = array_merge($config['zfcuser'], $moduleConfig); Loading