public function getAvailableDirective(Request $request)
    {
        if (null === $this->uaParser) {
            return $this->getChromeDirectives();
        }

        switch ($this->uaParser->getBrowser($request->headers->get('user-agent'))) {
            case UserAgentParserInterface::BROWSER_CHROME:
            case UserAgentParserInterface::BROWSER_OPERA:
            case UserAgentParserInterface::BROWSER_OTHER:
                return $this->getChromeDirectives();
            case UserAgentParserInterface::BROWSER_FIREFOX:
                return $this->getFirefoxDirectives();
            case UserAgentParserInterface::BROWSER_SAFARI:
                return $this->getLevel1();
        }
    }
public function getAvailableDirective(Request $request)
    {
        if (null === $this->uaParser) {
            return $this->getChromeDirectives();
        }

        switch ($this->uaParser->getBrowser($request->headers->get('user-agent'))) {
            case UserAgentParserInterface::BROWSER_CHROME:
            case UserAgentParserInterface::BROWSER_OPERA:
            case UserAgentParserInterface::BROWSER_OTHER:
                return $this->getChromeDirectives();
            case UserAgentParserInterface::BROWSER_FIREFOX:
                return $this->getFirefoxDirectives();
            case UserAgentParserInterface::BROWSER_SAFARI:
                return $this->getLevel1();
        }
    }
public function getAvailableDirective ( Request $ request ) { if ( null === $ this -> uaParser ) { return $ this -> getChromeDirectives ( ) ; } switch ( $ this -> uaParser -> getBrowser ( $ request -> headers -> get ( 'user-agent' ) ) ) { case UserAgentParserInterface :: BROWSER_CHROME : case UserAgentParserInterface :: BROWSER_OPERA : case UserAgentParserInterface :: BROWSER_OTHER : return $ this -> getChromeDirectives ( ) ; case UserAgentParserInterface :: BROWSER_FIREFOX : return $ this -> getFirefoxDirectives ( ) ; case UserAgentParserInterface :: BROWSER_SAFARI : return $ this -> getLevel1 ( ) ; } }
Returns the list of supported directives for the current Request

@param Request $request

@return array
Returns the list of supported directives for the current Request