public function configureFromUserAgentString($string, UserAgentStringParser $parser = null)
    {
        $parser = $parser ?: new UserAgentStringParser();
        $result = $string !== null ? $parser->parse($string) : $parser->parseFromGlobal();

        $this->setUserAgentString($string);
        $this->fromArray($result);
    }
public function configureFromUserAgentString($string, UserAgentStringParser $parser = null)
    {
        $parser = $parser ?: new UserAgentStringParser();
        $result = $string !== null ? $parser->parse($string) : $parser->parseFromGlobal();

        $this->setUserAgentString($string);
        $this->fromArray($result);
    }
public function configureFromUserAgentString ( $ string , UserAgentStringParser $ parser = null ) { $ parser = $ parser ? : new UserAgentStringParser ( ) ; $ result = $ string !== null ? $ parser -> parse ( $ string ) : $ parser -> parseFromGlobal ( ) ; $ this -> setUserAgentString ( $ string ) ; $ this -> fromArray ( $ result ) ; }
Configures the user agent information from a user agent string.

@param string $string The user agent string
@param \FlameCore\UserAgent\UserAgentStringParser $parser The parser used to parse the string
Configures the user agent information from a user agent string .