Метод | Описание | |
---|---|---|
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 |
Результат | stdClass | the object containing the browsers details. Array if $return_array is set to true. |
public getCache ( ) : BrowscapPHP\Cache\BrowscapCacheInterface | ||
Результат | BrowscapPHP\Cache\BrowscapCacheInterface |
public getFormatter ( ) : BrowscapPHP\Formatter\FormatterInterface | ||
Результат | BrowscapPHP\Formatter\FormatterInterface |
public getLogger ( ) : Psr\Log\LoggerInterface | ||
Результат | Psr\Log\LoggerInterface |
public getParser ( ) : BrowscapPHP\Parser\ParserInterface | ||
Результат | BrowscapPHP\Parser\ParserInterface |
public setCache ( BrowscapPHP\Cache\BrowscapCacheInterface | WurflCache\Adapter\AdapterInterface $cache ) : |
||
$cache | BrowscapPHP\Cache\BrowscapCacheInterface | WurflCache\Adapter\AdapterInterface | |
Результат |
public setFormatter ( BrowscapPHP\Formatter\FormatterInterface $formatter ) : |
||
$formatter | BrowscapPHP\Formatter\FormatterInterface | |
Результат |
public setLogger ( Psr\Log\LoggerInterface $logger ) : |
||
$logger | Psr\Log\LoggerInterface | |
Результат |
public setParser ( BrowscapPHP\Parser\ParserInterface $parser ) : |
||
$parser | BrowscapPHP\Parser\ParserInterface | |
Результат |