
Public Member Functions | |
| __construct (spunQ_IHttpRequest $request) | |
| Constructor. | |
| getBrand () | |
| The browser type. | |
| getVersionString () | |
| The whole version string. | |
| getMajorversion () | |
| Major version of the browser. | |
| isBot () | |
| Whether the 'browser' is actually a web crawler. | |
Public Attributes | |
| const | BROWSER_UNKNOWN = 0 |
| Unidentified browser. | |
| const | BROWSER_IE = 1 |
| Internet explorer. | |
| const | BROWSER_FIREFOX = 2 |
| Mozilla Firefox. | |
| const | BROWSER_SAFARI = 3 |
| Safari. | |
| const | BROWSER_CHROME = 4 |
| Google Chrome. | |
| const | BROWSER_OPERA = 5 |
| Opera. | |
Protected Member Functions | |
| init () | |
| Initializes all variables. | |
Protected Attributes | |
| $brand | |
| Holds value for getBrand(). | |
| $majorVersion | |
| Holds value for getMajorversion(). | |
| $versionString | |
| Holds value for getVersionString(). | |
| $isBot | |
| Holds value for isBot(). | |
Definition at line 6 of file HttpClientBrowserInformation.class.php.
| spunQ_HttpClientBrowserInformation::__construct | ( | spunQ_IHttpRequest $ | request | ) |
Constructor.
| $request | The request to extract information from. |
Definition at line 40 of file HttpClientBrowserInformation.class.php.
| spunQ_HttpClientBrowserInformation::getBrand | ( | ) |
The browser type.
Implements spunQ_IHttpClientBrowserInformation.
Definition at line 48 of file HttpClientBrowserInformation.class.php.
| spunQ_HttpClientBrowserInformation::getMajorversion | ( | ) |
Major version of the browser.
Some browser don't have a minor version (*cough* explorer *cough*), while others use obscure versioning strings that are incompatible with the actual browser version (*choke* safari). This is why the major version is the only part common to all browsers.
Implements spunQ_IHttpClientBrowserInformation.
Definition at line 64 of file HttpClientBrowserInformation.class.php.
| spunQ_HttpClientBrowserInformation::getVersionString | ( | ) |
The whole version string.
Note that version string need not contain its major version number.
Implements spunQ_IHttpClientBrowserInformation.
Definition at line 56 of file HttpClientBrowserInformation.class.php.
| spunQ_HttpClientBrowserInformation::isBot | ( | ) |
Whether the 'browser' is actually a web crawler.
We can be quite sure that a client is a browser, but we cannot know if a malicious bot is not spoofing its user-agent string, so don't trust this value too much.
Implements spunQ_IHttpClientBrowserInformation.
Definition at line 72 of file HttpClientBrowserInformation.class.php.
spunQ_HttpClientBrowserInformation::$brand [protected] |
Holds value for getBrand().
Initialized in init().
Definition at line 13 of file HttpClientBrowserInformation.class.php.
spunQ_HttpClientBrowserInformation::$isBot [protected] |
Holds value for isBot().
Initialized in init().
Definition at line 34 of file HttpClientBrowserInformation.class.php.
spunQ_HttpClientBrowserInformation::$majorVersion [protected] |
Holds value for getMajorversion().
Initialized in init().
Definition at line 20 of file HttpClientBrowserInformation.class.php.
spunQ_HttpClientBrowserInformation::$versionString [protected] |
Holds value for getVersionString().
Initialized in init().
Definition at line 27 of file HttpClientBrowserInformation.class.php.
1.5.9