BrowserThe Browser:: class provides capability information for the current web client.
Browser identification is performed by examining the HTTP_USER_AGENT environment variable provided by the web server.
Located in /Browser/Browser.php (line 27)
void
downloadHeaders
([string $filename = 'unknown'], [string $cType = null], [boolean $inline = false], [string $cLength = null])
string
$_accept
= '' (line 69)
HTTP_ACCEPT string
string
$_agent
= '' (line 55)
Full user agent string.
string
$_browser
= '' (line 48)
Browser name.
array
$_features
= array(Features.
array
$_images
= array('jpeg', 'gif', 'png', 'pjpeg', 'x-png', 'bmp') (line 262)
List of viewable image MIME subtypes.
This list of viewable images works for IE and Netscape/Mozilla.
string
$_lowerAgent
= '' (line 62)
Lower-case user agent string.
integer
$_majorVersion
= 0 (line 34)
Major version number.
integer
$_minorVersion
= 0 (line 41)
Minor version number.
boolean
$_mobile
= false (line 203)
Is this a mobile browser?
mixed
$_mobileAgents
= array(List of mobile user agents.
Browsers like Mobile Safari (iPhone, iPod Touch) are much more full featured than OpenWave style browsers. This makes it dicey in some cases to treat all "mobile" browsers the same way.
string
$_platform
= '' (line 76)
Platform the browser is running on.
array
$_quirks
= array(Quirks
string
$_robotAgentRegexp
= null (line 153)
Regexp for matching those robot strings.
array
$_robotAgents
= array(Known robots.
mixed
$_tvAgents
= array(List of tv user agents.
Constructor Browser (line 294)
Creates a browser instance (Constructor).
allowFileUploads (line 972)
Determines if files can be uploaded to the system.
downloadHeaders (line 1077)
Returns the headers for a browser download.
escapeJSCode (line 1197)
Escapes characters in javascript code if the browser requires it. %23, %26, and %2B (for some browsers) and %27 need to be escaped or else javascript will interpret it as a single quote, pound sign, or ampersand and refuse to work.
getAgentString (line 858)
Returns the full browser agent string.
getBrowser (line 818)
Returns the current browser.
getFeature (line 930)
Returns the current browser capability.
getHTTPProtocol (line 954)
Returns the server protocol in use on the current server.
getIEVersion (line 1230)
Returns the IE version stored in the session, if available.
getMajor (line 828)
Returns the current browser's major version.
getMinor (line 838)
Returns the current browser's minor version.
getPlatform (line 758)
Returns the currently matched platform.
getQuirk (line 893)
Returns unique behavior for the current browser.
getVersion (line 848)
Returns the current browser's version.
hasFeature (line 918)
Checks the current browser capabilities.
hasQuirk (line 881)
Checks unique behavior for the current browser.
isBrowser (line 780)
Determines if the given browser is the same as the current.
isMobile (line 790)
Do we consider the current browser to be a mobile device?
isRobot (line 800)
Determines if the browser is a robot or not.
isViewable (line 1147)
Determines if a browser can display a given MIME type.
match (line 306)
Parses the user agent string and inititializes the object with all the known features and quirks for the given browser.
setBrowser (line 768)
Sets the current browser.
setFeature (line 906)
Sets capabilities for the current browser.
setIEVersion (line 1218)
Sets the IE version in the session.
setQuirk (line 869)
Sets unique behavior for the current browser.
singleton (line 276)
Returns a reference to the global Browser object, only creating it if it doesn't already exist.
This method must be invoked as:
usingSSLConnection (line 942)
Determines if we are using a secure (SSL) connection.
wasFileUploaded (line 1024)
Determines if the file was uploaded or not. If not, will return the appropriate error message.
_setPlatform (line 742)
Matches 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.
Documentation generated on Sun, 30 Nov 2008 02:32:56 -0500 by phpDocumentor 1.4.0