Firewall/HostRoleListener.php
protected function getHostRole(GetResponseEvent $event)
    {
        $hostRole = null;
        $hostname = $event->getRequest()->getHttpHost();

        foreach ($this->config as $hostPattern => $role) {
            if ($this->isValid($hostPattern, $hostname)) {
                $hostRole = $role;

                break;
            }
        }

        return $hostRole;
    }
protected function getHostRole(GetResponseEvent $event)
    {
        $hostRole = null;
        $hostname = $event->getRequest()->getHttpHost();

        foreach ($this->config as $hostPattern => $role) {
            if ($this->isValid($hostPattern, $hostname)) {
                $hostRole = $role;

                break;
            }
        }

        return $hostRole;
    }
protected function getHostRole ( GetResponseEvent $ event ) { $ hostRole = null ; $ hostname = $ event -> getRequest ( ) -> getHttpHost ( ) ; foreach ( $ this -> config as $ hostPattern => $ role ) { if ( $ this -> isValid ( $ hostPattern , $ hostname ) ) { $ hostRole = $ role ; break ; } } return $ hostRole ; }
Get the host role.

@param GetResponseEvent $event The response event

@return null|string
Get the host role .