[ Index ]

PHP Cross Reference of Joomla 1.5.26 DE

title

Body

[close]

/libraries/joomla/environment/ -> browser.php (summary)

(no description)

Copyright: Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
License: GNU/GPL, see LICENSE.php
Version: $Id: browser.php 14401 2010-01-26 14:10:00Z louis $
File Size: 853 lines (29 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

JBrowser:: (22 methods):
  __construct()
  getInstance()
  match()
  _setPlatform()
  getPlatform()
  setBrowser()
  getBrowser()
  getMajor()
  getMinor()
  getVersion()
  getAgentString()
  getHTTPProtocol()
  setQuirk()
  hasQuirk()
  getQuirk()
  setFeature()
  hasFeature()
  getFeature()
  isViewable()
  isBrowser()
  isRobot()
  isSSLConnection()


Class: JBrowser  - X-Ref

Browser class, provides capability information about the current web client.

Browser identification is performed by examining the HTTP_USER_AGENT
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

__construct($userAgent = null, $accept = null)   X-Ref
Create a browser instance (Constructor).

param: string $userAgent  The browser string to parse.
param: string $accept     The HTTP_ACCEPT settings to use.

getInstance($userAgent = null, $accept = null)   X-Ref
Returns a reference to the global Browser object, only creating it
if it doesn't already exist.

This method must be invoked as:
<pre>  $browser = &JBrowser::getInstance([$userAgent[, $accept]]);</pre>

param: string $userAgent  The browser string to parse.
param: string $accept     The HTTP_ACCEPT settings to use.
return: JBrowser  The Browser object.

match($userAgent = null, $accept = null)   X-Ref
Parses the user agent string and inititializes the object with
all the known features and quirks for the given browser.

param: string $userAgent  The browser string to parse.
param: string $accept     The HTTP_ACCEPT settings to use.

_setPlatform()   X-Ref
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.

getPlatform()   X-Ref
Return the currently matched platform.

return: string  The user's platform.

setBrowser($browser)   X-Ref
Sets the current browser.

param: string $browser  The browser to set as current.

getBrowser()   X-Ref
Retrieve the current browser.

return: string  The current browser.

getMajor()   X-Ref
Retrieve the current browser's major version.

return: integer  The current browser's major version.

getMinor()   X-Ref
Retrieve the current browser's minor version.

return: integer  The current browser's minor version.

getVersion()   X-Ref
Retrieve the current browser's version.

return: string  The current browser's version.

getAgentString()   X-Ref
Return the full browser agent string.

return: string  The browser agent string.

getHTTPProtocol()   X-Ref
Returns the server protocol in use on the current server.

return: string  The HTTP server protocol version.

setQuirk($quirk, $value = true)   X-Ref
Set unique behavior for the current browser.

param: string $quirk  The behavior to set.
param: string $value  Special behavior parameter.

hasQuirk($quirk)   X-Ref
Check unique behavior for the current browser.

param: string $quirk  The behavior to check.
return: boolean  Does the browser have the behavior set?

getQuirk($quirk)   X-Ref
Retrieve unique behavior for the current browser.

param: string $quirk  The behavior to retrieve.
return: string  The value for the requested behavior.

setFeature($feature, $value = true)   X-Ref
Set capabilities for the current browser.

param: string $feature  The capability to set.
param: string $value Special capability parameter.

hasFeature($feature)   X-Ref
Check the current browser capabilities.

param: string $feature  The capability to check.
return: boolean  Does the browser have the capability set?

getFeature($feature)   X-Ref
Retrieve the current browser capability.

param: string $feature  The capability to retrieve.
return: string  The value of the requested capability.

isViewable($mimetype)   X-Ref
Determines if a browser can display a given MIME type.

param: string $mimetype  The MIME type to check.
return: boolean  True if the browser can display the MIME type.

isBrowser($browser)   X-Ref
Determine if the given browser is the same as the current.

param: string $browser  The browser to check.
return: boolean  Is the given browser the same as the current?

isRobot()   X-Ref
Determines if the browser is a robot or not.

return: boolean  True if browser is a known robot.

isSSLConnection()   X-Ref
Determine if we are using a secure (SSL) connection.

return: boolean  True if using SSL, false if not.



Generated: Wed Mar 28 15:54:07 2012 Cross-referenced by PHPXref 0.7.1