Browser
class Browser
Browser class, provides capability information about the current web client.
Browser identification is performed by examining the HTTPUSERAGENT environment variable provided by the web server.
This class has many influences from the lib/Browser.php code in version 3 of Horde by Chuck Hagenbuch and Jon Parise.
Methods
Create a browser instance (constructor).
Returns the global Browser object, only creating it if it doesn't already exist.
Parses the user agent string and inititializes the object with all the known features and quirks for the given browser.
Return the currently matched platform.
Sets the current browser.
Retrieve the current browser.
Retrieve the current browser's major version.
Retrieve the current browser's minor version.
Retrieve the current browser's version.
Return the full browser agent string.
Returns the server protocol in use on the current server.
Determines if a browser can display a given MIME type.
Determine if the given browser is the same as the current.
Determines if the browser is a robot or not.
Determines if the browser is mobile version or not.
Determine if we are using a secure (SSL) connection.
Details
__construct(
string $userAgent = null,
string $accept = null)
Create a browser instance (constructor).
static
Browser
getInstance(
string $userAgent = null,
string $accept = null)
Returns the global Browser object, only creating it if it doesn't already exist.
void
match(
string $userAgent = null,
string $accept = null)
Parses the user agent string and inititializes the object with all the known features and quirks for the given browser.