Property | Type | Description | |
---|---|---|---|
$agent | string | Current user-agent | |
$browser | string | Current user-agent browser | |
$browsers | array | List of browsers to compare against current user agent | |
$charsets | array | Character sets accepted by the current user agent | |
$is_browser | boolean | Flag for if the user-agent belongs to a browser | |
$is_mobile | boolean | Flag for if the user-agent is a mobile browser | |
$is_robot | boolean | Flag for if the user-agent is a robot | |
$languages | array | Languages accepted by the current user agent | |
$mobile | string | Current user-agent mobile name | |
$mobiles | array | List of mobile browsers to compare against current user agent | |
$platform | string | Current user-agent platform | |
$platforms | array | List of platforms to compare against current user agent | |
$referer | mixed | HTTP Referer | |
$robot | string | Current user-agent robot name | |
$robots | array | List of robots to compare against current user agent | |
$version | string | Current user-agent version |
Method | Description | |
---|---|---|
__construct ( ) : void | Constructor | |
accept_charset ( string $charset = 'utf-8' ) : boolean | Test for a particular character set | |
accept_lang ( string $lang = 'en' ) : boolean | Test for a particular language | |
agent_string ( ) : string | Agent String | |
browser ( ) : string | Get Browser Name | |
charsets ( ) : array | Get the accepted Character Sets | |
is_browser ( string $key = NULL ) : boolean | Is Browser | |
is_mobile ( string $key = NULL ) : boolean | Is Mobile | |
is_referral ( ) : boolean | Is this a referral from another site? | |
is_robot ( string $key = NULL ) : boolean | Is Robot | |
languages ( ) : array | Get the accepted languages | |
mobile ( ) : string | Get the Mobile Device | |
parse ( string $string ) : void | Parse a custom user-agent string | |
platform ( ) : string | Get Platform | |
referrer ( ) : boolean | Get the referrer | |
robot ( ) : string | Get The Robot Name | |
version ( ) : string | Get the Browser Version |
Method | Description | |
---|---|---|
_compile_data ( ) : boolean | Compile the User Agent Data | |
_load_agent_file ( ) : boolean | Compile the User Agent Data | |
_set_browser ( ) : boolean | Set the Browser | |
_set_charsets ( ) : void | Set the accepted character sets | |
_set_languages ( ) : void | Set the accepted languages | |
_set_mobile ( ) : boolean | Set the Mobile Device | |
_set_platform ( ) : boolean | Set the Platform | |
_set_robot ( ) : boolean | Set the Robot |
public __construct ( ) : void | ||
return | void |
protected _compile_data ( ) : boolean | ||
return | boolean |
protected _load_agent_file ( ) : boolean | ||
return | boolean |
protected _set_charsets ( ) : void | ||
return | void |
protected _set_languages ( ) : void | ||
return | void |
protected _set_mobile ( ) : boolean | ||
return | boolean |
protected _set_platform ( ) : boolean | ||
return | boolean |
public accept_charset ( string $charset = 'utf-8' ) : boolean | ||
$charset | string | |
return | boolean |
public accept_lang ( string $lang = 'en' ) : boolean | ||
$lang | string | |
return | boolean |
public is_browser ( string $key = NULL ) : boolean | ||
$key | string | |
return | boolean |
public is_referral ( ) : boolean | ||
return | boolean |
public array $browsers | ||
return | array |
public array $charsets | ||
return | array |
public bool $is_browser | ||
return | boolean |
public bool $is_mobile | ||
return | boolean |
public bool $is_robot | ||
return | boolean |
public array $languages | ||
return | array |
public array $mobiles | ||
return | array |
public array $platforms | ||
return | array |
public array $robots | ||
return | array |