Commit ae13cdeb authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Correction de ModuleOptionsFactory fusionné à la légère.

parent 96783864
Loading
Loading
Loading
Loading
+5 −8
Original line number Diff line number Diff line
@@ -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);