public function getFirewall($configName = null, array $options = array(), Request $request = null)
    {
        if (!$request) {
            if ($this->container->has('request_stack')) {
                $requestStack = $this->container->get('request_stack');
                $request = $requestStack->getCurrentRequest();
            } elseif ($this->container->has('request')) {
                $request = $this->container->get('request');
            } else {
                throw new \Exception('Request object undefined');
            }
        }

        $firewall = new $this->firewallClass();
        $firewall->setProvider($this);
        $firewall->setRequest($request);

        $this->setDefaults($firewall, $configName, $options);

        $this->firewalls[] = $firewall;

        return $firewall;
    }
public function getFirewall($configName = null, array $options = array(), Request $request = null)
    {
        if (!$request) {
            if ($this->container->has('request_stack')) {
                $requestStack = $this->container->get('request_stack');
                $request = $requestStack->getCurrentRequest();
            } elseif ($this->container->has('request')) {
                $request = $this->container->get('request');
            } else {
                throw new \Exception('Request object undefined');
            }
        }

        $firewall = new $this->firewallClass();
        $firewall->setProvider($this);
        $firewall->setRequest($request);

        $this->setDefaults($firewall, $configName, $options);

        $this->firewalls[] = $firewall;

        return $firewall;
    }
public function getFirewall ( $ configName = null , array $ options = array ( ) , Request $ request = null ) { if ( ! $ request ) { if ( $ this -> container -> has ( 'request_stack' ) ) { $ requestStack = $ this -> container -> get ( 'request_stack' ) ; $ request = $ requestStack -> getCurrentRequest ( ) ; } elseif ( $ this -> container -> has ( 'request' ) ) { $ request = $ this -> container -> get ( 'request' ) ; } else { throw new \ Exception ( 'Request object undefined' ) ; } } $ firewall = new $ this -> firewallClass ( ) ; $ firewall -> setProvider ( $ this ) ; $ firewall -> setRequest ( $ request ) ; $ this -> setDefaults ( $ firewall , $ configName , $ options ) ; $ this -> firewalls [ ] = $ firewall ; return $ firewall ; }
Get a firewall set with a predefined configuration or with additional setting

@param string|null $configName Predefined configuration name
@param array       $options    Additional setting
@param Request     $request    Request

@return FirewallInterface
Get a firewall set with a predefined configuration or with additional setting