HostLocalizationFactory.php 682 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php

namespace UnicaenApp\HostLocalization;

use Interop\Container\ContainerInterface;

class HostLocalizationFactory
{
    public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
    {
        $config         = $container->get('config');
        $activated      = $config['hostlocalization']['activated'];
        $proxies        = $config['hostlocalization']['proxies'];
        $reverseProxies = $config['hostlocalization']['reverse-proxies'];
        $masqueIp       = $config['hostlocalization']['masque-ip'];

        $service = new HostLocalization($activated, $masqueIp, $proxies, $reverseProxies);


        return $service;
    }
}