Method | Description | |
---|---|---|
getBrowser ( string $userAgent = null ) : stdClass | parses the given user agent to get the information about the browser | |
getCache ( ) : BrowscapPHP\Cache\BrowscapCacheInterface | Gets a cache instance | |
getFormatter ( ) : BrowscapPHP\Formatter\FormatterInterface | ||
getLogger ( ) : Psr\Log\LoggerInterface | returns a logger instance | |
getParser ( ) : BrowscapPHP\Parser\ParserInterface | returns an instance of the used parser class | |
setCache ( BrowscapPHP\Cache\BrowscapCacheInterface | WurflCache\Adapter\AdapterInterface $cache ) : |
Sets a cache instance | |
setFormatter ( BrowscapPHP\Formatter\FormatterInterface $formatter ) : |
Set theformatter instance to use for the getBrowser() result | |
setLogger ( Psr\Log\LoggerInterface $logger ) : |
Sets a logger instance | |
setParser ( BrowscapPHP\Parser\ParserInterface $parser ) : |
Sets the parser instance to use |
public getBrowser ( string $userAgent = null ) : stdClass | ||
$userAgent | string | the user agent string |
return | stdClass | the object containing the browsers details. Array if $return_array is set to true. |
public getCache ( ) : BrowscapPHP\Cache\BrowscapCacheInterface | ||
return | BrowscapPHP\Cache\BrowscapCacheInterface |
public getFormatter ( ) : BrowscapPHP\Formatter\FormatterInterface | ||
return | BrowscapPHP\Formatter\FormatterInterface |
public getLogger ( ) : Psr\Log\LoggerInterface | ||
return | Psr\Log\LoggerInterface |
public getParser ( ) : BrowscapPHP\Parser\ParserInterface | ||
return | BrowscapPHP\Parser\ParserInterface |
public setCache ( BrowscapPHP\Cache\BrowscapCacheInterface | WurflCache\Adapter\AdapterInterface $cache ) : |
||
$cache | BrowscapPHP\Cache\BrowscapCacheInterface | WurflCache\Adapter\AdapterInterface | |
return |
public setFormatter ( BrowscapPHP\Formatter\FormatterInterface $formatter ) : |
||
$formatter | BrowscapPHP\Formatter\FormatterInterface | |
return |
public setLogger ( Psr\Log\LoggerInterface $logger ) : |
||
$logger | Psr\Log\LoggerInterface | |
return |
public setParser ( BrowscapPHP\Parser\ParserInterface $parser ) : |
||
$parser | BrowscapPHP\Parser\ParserInterface | |
return |