Elcodi\Common\FirewallBundle\CompilerPass\FirewallCompilerPass::process PHP Method

process() public method

Attach event listeners and firewall listeners to firewalls
public process ( ContainerBuilder $container ) : null
$container Symfony\Component\DependencyInjection\ContainerBuilder Container
return null
    public function process(ContainerBuilder $container)
    {
        if (!$container->has('security.firewall.context')) {
            return null;
        }
        $listenersByContext = $this->collectListenersByProviderKey($container);
        foreach ($listenersByContext as $providerKey => $listenersByType) {
            if (isset($listenersByType['event'])) {
                $listenerId = $this->attachEvents($container, $providerKey, $listenersByType['event']);
                $listenersByType['firewall'][0][] = new Reference($listenerId);
            }
            if (isset($listenersByType['firewall'])) {
                $this->attachListeners($container, $providerKey, $listenersByType['firewall']);
            }
        }
    }