Class: Browser
Source Location: /modules/horde/Browser.php
The Browser:: class provides capability information for the current web client. Browser identification is performed by examining the HTTP_USER_AGENT environmental variable provide by the web server.
Author(s):
|
|
|
Class Details
Class Variables
Class Methods
constructor Browser [line 221]
Browser Browser(
[optional
$userAgent = null], [optional
$accept = null])
|
|
Create a browser instance (Constructor).
Tags:
Parameters:
method allowFileUploads [line 822]
integer allowFileUploads(
)
|
|
Determine if files can be uploaded to the system.
Tags:
method downloadHeaders [line 920]
void downloadHeaders(
[optional
$filename = 'unknown'], [optional
$cType = null], [optional
$inline = false], [optional
$cLength = null])
|
|
Returns the headers for a browser download.
Tags:
Parameters:
method escapeJSCode [line 1043]
string escapeJSCode(
string
$code)
|
|
Escape characters in javascript code if the browser requires it. %23, %26, and %2B (for IE) and %27 need to be escaped or else jscript will interpret it as a single quote, pound sign, or ampersand and refuse to work.
Tags:
Parameters:
method getAgentString [line 690]
Return the full browser agent string.
Tags:
method getBrowser [line 642]
Retrieve the current browser.
Tags:
method getFeature [line 774]
string getFeature(
string
$feature)
|
|
Retreive the current browser capability.
Tags:
Parameters:
method getHTTPProtocol [line 802]
string getHTTPProtocol(
)
|
|
Returns the server protocol in use on the current server.
Tags:
method getIEVersion [line 1079]
Return the IE version stored in the session, if available.
Tags:
method getMajor [line 654]
Retrieve the current browser's major version.
Tags:
method getMinor [line 666]
Retrieve the current browser's minor version.
Tags:
method getPlatform [line 577]
Return the currently matched platform.
Tags:
method getQuirk [line 731]
string getQuirk(
string
$quirk)
|
|
Retreive unique behavior for the current browser.
Tags:
Parameters:
method getVersion [line 678]
Retrieve the current browser's version.
Tags:
method hasFeature [line 760]
boolean hasFeature(
string
$feature)
|
|
Check the current browser capabilities.
Tags:
Parameters:
method hasQuirk [line 717]
boolean hasQuirk(
string
$quirk)
|
|
Check unique behavior for the current browser.
Tags:
Parameters:
method isBrowser [line 603]
boolean isBrowser(
string
$browser)
|
|
Determine if the given browser is the same as the current.
Tags:
Parameters:
method isMobile [line 613]
Do we consider the current browser to be a mobile device?
Tags:
method isRobot [line 625]
Determines if the browser is a robot or not.
Tags:
method isViewable [line 990]
boolean isViewable(
string
$mimetype)
|
|
Determines if a browser can display a given MIME type.
Tags:
Parameters:
method match [line 235]
void match(
[optional
$userAgent = null], [optional
$accept = null])
|
|
Parses the user agent string and inititializes the object with all the known features and quirks for the given browser.
Tags:
Parameters:
method setBrowser [line 589]
void setBrowser(
string
$browser)
|
|
Sets the current browser.
Tags:
Parameters:
method setFeature [line 746]
void setFeature(
string
$feature, [optional
$value = true])
|
|
Set capabilities for the current browser.
Tags:
Parameters:
method setIEVersion [line 1065]
void setIEVersion(
string
$ver)
|
|
Set the IE version in the session.
Tags:
Parameters:
method setQuirk [line 703]
void setQuirk(
string
$quirk, [optional
$value = true])
|
|
Set unique behavior for the current browser.
Tags:
Parameters:
method singleton [line 197]
object Browser &singleton(
[optional
$userAgent = null], [optional
$accept = null])
|
|
Returns a reference to the global Browser object, only creating it if it doesn't already exist. This method must be invoked as: $browser = &Browser::singleton([$userAgent[, $accept]]);
Tags:
Parameters:
method usingSSLConnection [line 788]
boolean usingSSLConnection(
)
|
|
Determine if we are using a secure (SSL) connection.
Tags:
method wasFileUploaded [line 862]
mixed wasFileUploaded(
string
$field, [optional
$name = null])
|
|
Determines if the file was uploaded or not. If not, will return the appropriate error message.
Tags:
Parameters:
method _setPlatform [line 559]
Match the platform of the browser. This is a pretty simplistic implementation, but it's intended to let us tell what line breaks to send, so it's good enough for its purpose.
Tags:
|
|