Net_UserAgent
[ class tree: Net_UserAgent ] [ index: Net_UserAgent ] [ all elements ]

Class: Net_UserAgent_Detect_APC

Source Location: /Net_UserAgent_Detect-2.4.0/Detect/APC.php

Class Overview

Net_UserAgent_Detect
   |
   --Net_UserAgent_Detect_APC

The Net_UserAgent_Detect object does a number of tests on an HTTP user


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods

Class: Net_UserAgent_Detect

Net_UserAgent_Detect::Net_UserAgent_Detect()
Net_UserAgent_Detect::detect()
Detect the user agent and prepare flags, features and quirks based on what is found
Net_UserAgent_Detect::getAcceptType()
Retrive the accept type for the current browser.
Net_UserAgent_Detect::getBrowser()
Since simply returning the "browser" is somewhat ambiguous since there are different ways to classify the browser, this function works by taking an expect list and returning the string of the first match, so put the important ones first in the array.
Net_UserAgent_Detect::getBrowserString()
This function returns the vendor string corresponding to the flag.
Net_UserAgent_Detect::getFeature()
Get the capabilities for the current browser.
Net_UserAgent_Detect::getOS()
Since simply returning the "os" is somewhat ambiguous since there are different ways to classify the browser, this function works by taking an expect list and returning the string of the first match, so put the important ones first in the array.
Net_UserAgent_Detect::getOSString()
This function returns the os string corresponding to the flag.
Net_UserAgent_Detect::getQuirk()
Get the unique behavior for the current browser.
Net_UserAgent_Detect::getUserAgent()
Return the user agent string that is being worked on
Net_UserAgent_Detect::hasAcceptType()
Check the accept types for the current browser.
Net_UserAgent_Detect::hasFeature()
Check the capabilities for the current browser.
Net_UserAgent_Detect::hasQuirk()
Check a unique behavior for the current browser.
Net_UserAgent_Detect::isBrowser()
Look up the provide browser flag and return a boolean value
Net_UserAgent_Detect::isIE()
Determine if the browser is an Internet Explorer browser
Net_UserAgent_Detect::isNavigator()
Determine if the browser is a Netscape Navigator browser
Net_UserAgent_Detect::isNetscape()
Determine if the browser is a Netscape or Mozilla browser
Net_UserAgent_Detect::isOS()
Look up the provide OS flag and return a boolean value
Net_UserAgent_Detect::setAcceptType()
Set the accept types for the current browser.
Net_UserAgent_Detect::setFeature()
Set capabilities for the current browser.
Net_UserAgent_Detect::setOption()
Sets a class option. The available settings are:
  • 'userAgent' => The user agent string to detect (useful for
checking a string manually).
Net_UserAgent_Detect::setQuirk()
Set a unique behavior for the current browser.
Net_UserAgent_Detect::singleton()
To be used in place of the contructor to return only open instance.

Class Details

[line 22]
The Net_UserAgent_Detect object does a number of tests on an HTTP user

agent string. The results of these tests are available via methods of the object. Note that all methods in this class can be called statically. The constructor and singleton methods are only retained for BC.

This module is based upon the JavaScript browser detection code available at http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html. This module had many influences from the lib/Browser.php code in version 1.3 of Horde.



[ Top ]


Class Variables

$key =  ''

[line 24]


Type:   mixed


[ Top ]



Method Detail

Net_UserAgent_Detect_APC (Constructor)   [line 26]

Net_UserAgent_Detect_APC Net_UserAgent_Detect_APC( [ $in_userAgent = null], [ $in_detect = null], [ $ua_cache_window = 600])


Parameters:

   $in_userAgent   — 
   $in_detect   — 
   $ua_cache_window   — 

[ Top ]

cache_restore   [line 84]

void cache_restore( $cache)


Parameters:

   $cache   — 

[ Top ]

cache_save   [line 96]

void cache_save( )


[ Top ]

singleton   [line 73]

void &singleton( [ $in_userAgent = null], [ $in_detect = null])


Overrides Net_UserAgent_Detect::singleton() (To be used in place of the contructor to return only open instance.)

Parameters:

   $in_userAgent   — 
   $in_detect   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:09:48 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.