Lists of User Agent chains for testing :
category | Zend |
---|---|
package | Zend_Http_UserAgent |
subpackage | UserAgent |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
__construct(null|array|\Zend_Config|\ArrayAccess $options = null
) : void
null
array
\Zend_Config
\ArrayAccess
clearStorage(string $browser = null
) : void
string
Browser identifier (User Agent chain)
getBrowserType() : string
string
$browserTypegetConfig() : array
array
getDevice() : \Zend_Http_UserAgent_Device
This is the object that will contain the various discovered device capabilities.
\Zend_Http_UserAgent_Device
$devicegetHttpAccept(string $httpAccept = null
) : string
string
(option) forced HTTP Accept chain
string
getPluginLoader(string $type) : \Zend_Loader_PluginLoader
string
A valid plugin loader type; see {@link $_loaderTypes}
\Zend_Loader_PluginLoader
getServer() : array
Basically, the $_SERVER array or an equivalent container storing the data that will be introspected.
If the value has not been previously set, it sets itself from the $_SERVER superglobal.
array
getServerValue(string $key) : mixed
string
mixed
getStorage(string $browser = null
) : \Zend_Http_UserAgent_Storage
Session storage is used by default unless a different storage adapter has been set via the "persistent_storage_adapter" key. That key should contain either a fully qualified class name, or a short name that resolves via the plugin loader.
string
Browser identifier (User Agent chain)
\Zend_Http_UserAgent_Storage
getUserAgent() : string
If $userAgent param is null, the value of $_server['HTTP_USER_AGENT'] is returned.
string
serialize() : string
string
setBrowserType(string $browserType) : \Zend_Http_UserAgent
string
\Zend_Http_UserAgent
setConfig(mixed $config = array()
) : \Zend_Http_UserAgent
The allowed parameters are :
mixed
(option) Config array
\Zend_Http_UserAgent
setHttpAccept(string $httpAccept) : \Zend_Http_UserAgent
string
Forced HTTP Accept chain
\Zend_Http_UserAgent
setOptions(array|\Zend_Config|\ArrayAccess $options) : \Zend_Http_UserAgent
array
\Zend_Config
\ArrayAccess
\Zend_Http_UserAgent
setPluginLoader(string $type, string|\Zend_Loader_PluginLoader $loader) : \Zend_Http_UserAgent
string
Type of plugin loader; one of 'storage', (?)
string
\Zend_Loader_PluginLoader
\Zend_Http_UserAgent
setServer(array|\ArrayAccess $server) : void
Basically, the $_SERVER array or an equivalent container storing the data that will be introspected.
array
\ArrayAccess
\Zend_Http_UserAgent_Exception |
on invalid parameter |
---|
setServerValue(string|integer|float $key, mixed $value) : void
string
integer
float
mixed
setStorage(\Zend_Http_UserAgent_Storage $storage) : \Zend_Http_UserAgent
\Zend_Http_UserAgent_Storage
\Zend_Http_UserAgent
setUserAgent(string $userAgent) : \Zend_Http_UserAgent
string
Forced UserAgent chain
\Zend_Http_UserAgent
unserialize(string $serialized) : void
string
_createDevice() : void
_getUserAgentDevice(string $browserType) : string
string
Browser type
\Zend_Loader_PluginLoader_Exception |
if unable to load UA device |
---|
string
_match(string $deviceClass) : boolean
The comparison is case-insensitive : the browser signatures must be in lower case
string
Name of class against which a match will be attempted
boolean
_matchUserAgent() : \Zend_Http_UserAgent_Result
\Zend_Http_UserAgent_Result
_validateLoaderType(string $type) : string
Verifies that it is in \$_loaderTypes, and returns a normalized version of the type.
string
\Zend_Http_UserAgent_Exception |
on invalid type |
---|
string
$_browserType : string
$_browserTypeClass : array
array()
Map of browser types to classes.
$_config : array
array('identification_sequence' => self::DEFAULT_IDENTIFICATION_SEQUENCE, 'storage' => array('adapter' => self::DEFAULT_PERSISTENT_STORAGE_ADAPTER))
Default values are provided to ensure specific keys are present at instantiation.
$_device : \Zend_Http_UserAgent_Device
$_immutable : boolean
false
If true, none of the following may be modified:
$_loaderTypes : array
array('storage', 'device')
$_loaders : array
array()
$_matchLog : array
array()
$_server : array
$_storage : \Zend_Http_UserAgent_Storage
DEFAULT_BROWSER_TYPE = 'desktop'
DEFAULT_HTTP_ACCEPT = "application/xhtml+xml"
DEFAULT_HTTP_USER_AGENT = 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)'
DEFAULT_IDENTIFICATION_SEQUENCE = 'mobile,desktop'
DEFAULT_MARKUP_LANGUAGE = "xhtml"
DEFAULT_PERSISTENT_STORAGE_ADAPTER = 'Session'