| [ Index ] |
|
Code source de eGroupWare 1.2.106-2 |
[Code source] [Imprimer] [Statistiques]
(pas de description)
| Poids: | 1082 lignes (36 kb) |
| Inclus ou requis: | 1 fois |
| Référencé: | 0 fois |
| Nécessite: | 0 fichiers |
Browser:: (29 méthodes):
singleton()
Browser()
match()
_setPlatform()
getPlatform()
setBrowser()
isBrowser()
isMobile()
isRobot()
getBrowser()
getMajor()
getMinor()
getVersion()
getAgentString()
setQuirk()
hasQuirk()
getQuirk()
setFeature()
hasFeature()
getFeature()
usingSSLConnection()
getHTTPProtocol()
allowFileUploads()
wasFileUploaded()
downloadHeaders()
isViewable()
escapeJSCode()
setIEVersion()
getIEVersion()
| singleton($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: $browser = &Browser::singleton([$userAgent[, $accept]]); param: optional string $userAgent The browser string to parse. param: optional string $accept The HTTP_ACCEPT settings to use. return: object Browser The Browser object. |
| Browser($userAgent = null, $accept = null) X-Ref |
| Create a browser instance (Constructor). param: optional string $userAgent The browser string to parse. param: optional string $accept The HTTP_ACCEPT settings to use. |
| 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: optional string $userAgent The browser string to parse. param: optional 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. |
| 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? |
| isMobile() X-Ref |
| Do we consider the current browser to be a mobile device? return: boolean True if we do, false if we don't. |
| isRobot() X-Ref |
| Determines if the browser is a robot or not. return: boolean True if browser is a known robot. |
| 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. |
| setQuirk($quirk, $value = true) X-Ref |
| Set unique behavior for the current browser. param: string $quirk The behavior to set. param: optional 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 |
| Retreive unique behavior for the current browser. param: string $quirk The behavior to retreive. 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: optional 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 |
| Retreive the current browser capability. param: string $feature The capability to retreive. return: string The value of the requested capability. |
| usingSSLConnection() X-Ref |
| Determine if we are using a secure (SSL) connection. return: boolean True if using SSL, false if not. |
| getHTTPProtocol() X-Ref |
| Returns the server protocol in use on the current server. return: string The HTTP server protocol version. |
| allowFileUploads() X-Ref |
| Determine if files can be uploaded to the system. return: integer If uploads allowed, returns the maximum size of the |
| wasFileUploaded($field, $name = null) X-Ref |
| Determines if the file was uploaded or not. If not, will return the appropriate error message. param: string $field The name of the field containing the param: optional string $name The file description string to use in the return: mixed True on success, PEAR_Error on error. |
| downloadHeaders($filename = 'unknown', $cType = null,$inline = false, $cLength = null) X-Ref |
| Returns the headers for a browser download. param: optional string $filename The filename of the download. param: optional string $cType The content-type description of the param: optional boolean $inline True if inline, false if attachment. param: optional string $cLength The content-length of this file. |
| 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. |
| escapeJSCode($code) X-Ref |
| 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. param: string $code The JS code to escape. return: string The escaped code. |
| setIEVersion($ver) X-Ref |
| Set the IE version in the session. param: string $ver The IE Version string. |
| getIEVersion() X-Ref |
| Return the IE version stored in the session, if available. return: mixed The IE Version string or null if no string is stored. |
| Généré le : Sun Feb 25 17:20:01 2007 | par Balluche grâce à PHPXref 0.7 |