-
Notifications
You must be signed in to change notification settings - Fork 0
CI_User_agent
User Agent Class
Identifies the platform, browser, robot, or mobile device of the browsing agent
- Class name: CI_User_agent
- Namespace:
public string $agent = NULL
Current user-agent
- Visibility: public
public boolean $is_browser = FALSE
Flag for if the user-agent belongs to a browser
- Visibility: public
public boolean $is_robot = FALSE
Flag for if the user-agent is a robot
- Visibility: public
public boolean $is_mobile = FALSE
Flag for if the user-agent is a mobile browser
- Visibility: public
public array $languages = array()
Languages accepted by the current user agent
- Visibility: public
public array $charsets = array()
Character sets accepted by the current user agent
- Visibility: public
public array $platforms = array()
List of platforms to compare against current user agent
- Visibility: public
public array $browsers = array()
List of browsers to compare against current user agent
- Visibility: public
public array $mobiles = array()
List of mobile browsers to compare against current user agent
- Visibility: public
public array $robots = array()
List of robots to compare against current user agent
- Visibility: public
public string $platform = ''
Current user-agent platform
- Visibility: public
public string $browser = ''
Current user-agent browser
- Visibility: public
public string $version = ''
Current user-agent version
- Visibility: public
public string $mobile = ''
Current user-agent mobile name
- Visibility: public
public string $robot = ''
Current user-agent robot name
- Visibility: public
public mixed $referer
HTTP Referer
- Visibility: public
void CI_User_agent::__construct()
Constructor
Sets the User Agent and runs the compilation routine
- Visibility: public
boolean CI_User_agent::_load_agent_file()
Compile the User Agent Data
- Visibility: protected
boolean CI_User_agent::_compile_data()
Compile the User Agent Data
- Visibility: protected
boolean CI_User_agent::_set_platform()
Set the Platform
- Visibility: protected
boolean CI_User_agent::_set_browser()
Set the Browser
- Visibility: protected
boolean CI_User_agent::_set_robot()
Set the Robot
- Visibility: protected
boolean CI_User_agent::_set_mobile()
Set the Mobile Device
- Visibility: protected
void CI_User_agent::_set_languages()
Set the accepted languages
- Visibility: protected
void CI_User_agent::_set_charsets()
Set the accepted character sets
- Visibility: protected
boolean CI_User_agent::is_browser(string $key)
Is Browser
- Visibility: public
- $key string
boolean CI_User_agent::is_robot(string $key)
Is Robot
- Visibility: public
- $key string
boolean CI_User_agent::is_mobile(string $key)
Is Mobile
- Visibility: public
- $key string
boolean CI_User_agent::is_referral()
Is this a referral from another site?
- Visibility: public
string CI_User_agent::agent_string()
Agent String
- Visibility: public
string CI_User_agent::platform()
Get Platform
- Visibility: public
string CI_User_agent::browser()
Get Browser Name
- Visibility: public
string CI_User_agent::version()
Get the Browser Version
- Visibility: public
string CI_User_agent::robot()
Get The Robot Name
- Visibility: public
string CI_User_agent::mobile()
Get the Mobile Device
- Visibility: public
boolean CI_User_agent::referrer()
Get the referrer
- Visibility: public
array CI_User_agent::languages()
Get the accepted languages
- Visibility: public
array CI_User_agent::charsets()
Get the accepted Character Sets
- Visibility: public
boolean CI_User_agent::accept_lang(string $lang)
Test for a particular language
- Visibility: public
- $lang string
boolean CI_User_agent::accept_charset(string $charset)
Test for a particular character set
- Visibility: public
- $charset string
void CI_User_agent::parse(string $string)
Parse a custom user-agent string
- Visibility: public
- $string string