category |
Zend |
package |
Zend_Http |
subpackage |
UserAgent |
copyright |
Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license |
New BSD License |
inherited_from |
\Zend_Http_UserAgent_Desktop |
Methods
Constructor
__construct(null|string|array $userAgent = null
, array $server = array()
, array $config = array()
) : void
Inherited
Allows injecting user agent, server array, and/or config array. If an
array is provided for the first argument, the assumption should be that
the device object is being seeded with cached values from serialization.
inherited_from |
\Zend_Http_UserAgent_Device::__construct() |
Parameters
$userAgent
null
string
array
If array, restores from serialized version
$server
array
$config
array
Gets all the browser/device features
getAllFeatures() : array
Inherited
inherited_from |
\Zend_Http_UserAgent_Device::getAllFeatures() |
Returns
array
Gets all the browser/device features' groups
getAllGroups() : array
Inherited
inherited_from |
\Zend_Http_UserAgent_Device::getAllGroups() |
Returns
array
Get the browser type
getBrowser() : string
Inherited
inherited_from |
\Zend_Http_UserAgent_Device::getBrowser() |
Returns
string
Get the browser version
getBrowserVersion() : string
Inherited
inherited_from |
\Zend_Http_UserAgent_Device::getBrowserVersion() |
Returns
string
Gets the value of the current browser/device feature
getFeature(string $feature) : string | null
Inherited
inherited_from |
\Zend_Http_UserAgent_Device::getFeature() |
Parameters
$feature
string
Feature to search
Returns
string
null
Gets an array of features associated to a group
getGroup(string $group) : array
Inherited
inherited_from |
\Zend_Http_UserAgent_Device::getGroup() |
Parameters
Returns
array
Get image types
getImages() : \the
Inherited
inherited_from |
\Zend_Http_UserAgent_Device::getImages() |
Returns
\the
$_images
Get maximum image height supported by this device
getMaxImageHeight() : integer
Inherited
inherited_from |
\Zend_Http_UserAgent_Device::getMaxImageHeight() |
Returns
integer
Get maximum image width supported by this device
getMaxImageWidth() : integer
Inherited
inherited_from |
\Zend_Http_UserAgent_Device::getMaxImageWidth() |
Returns
integer
Get physical screen height of this device
getPhysicalScreenHeight() : integer
Inherited
inherited_from |
\Zend_Http_UserAgent_Device::getPhysicalScreenHeight() |
Returns
integer
Get physical screen width of this device
getPhysicalScreenWidth() : integer
Inherited
inherited_from |
\Zend_Http_UserAgent_Device::getPhysicalScreenWidth() |
Returns
integer
Get preferred markup type
getPreferredMarkup() : string
Inherited
inherited_from |
\Zend_Http_UserAgent_Device::getPreferredMarkup() |
Returns
string
Gives the current browser type
getType() : string
inherited_from |
\Zend_Http_UserAgent_Desktop::getType() |
Returns
string
Gets the browser type identifier
getType() : string
Inherited
Get the user agent string
getUserAgent() : string
Inherited
inherited_from |
\Zend_Http_UserAgent_Device::getUserAgent() |
Returns
string
Get supported X/HTML version
getXhtmlSupportLevel() : integer
Inherited
inherited_from |
\Zend_Http_UserAgent_Device::getXhtmlSupportLevel() |
Returns
integer
Check a feature for the current browser/device.
hasFeature(string $feature) : boolean
Inherited
inherited_from |
\Zend_Http_UserAgent_Device::hasFeature() |
Parameters
$feature
string
The feature to check.
Returns
boolean
Does the device support Flash?
hasFlashSupport() : boolean
Inherited
inherited_from |
\Zend_Http_UserAgent_Device::hasFlashSupport() |
Returns
boolean
Does the device support PDF?
hasPdfSupport() : boolean
Inherited
inherited_from |
\Zend_Http_UserAgent_Device::hasPdfSupport() |
Returns
boolean
Does the device have a phone number associated with it?
hasPhoneNumber() : boolean
Inherited
inherited_from |
\Zend_Http_UserAgent_Device::hasPhoneNumber() |
Returns
boolean
Does the device support HTTPS?
httpsSupport() : boolean
Inherited
inherited_from |
\Zend_Http_UserAgent_Device::httpsSupport() |
Returns
boolean
Comparison of the UserAgent chain and User Agent signatures
match(string $userAgent, array $server) : boolean
Static
inherited_from |
\Zend_Http_UserAgent_Desktop::match() |
Parameters
$userAgent
string
User Agent chain
$server
array
$_SERVER like param
Returns
boolean
Used by default : must be always true
match(string $userAgent, array $server) : boolean
InheritedStatic
Parameters
$userAgent
string
User Agent chain
$server
array
$_SERVER like param
Returns
boolean
Serialize object
serialize() : string
Inherited
setBrowser()
setBrowser(string $browser)
Inherited
Parameters
$browser
string
setBrowserVersion()
setBrowserVersion(string $browserVersion)
Inherited
Parameters
$browserVersion
string
Set a feature for the current browser/device.
setFeature(string $feature, string $value = false
, string $group = ''
) : \Zend_Http_UserAgent_AbstractDevice
Inherited
Parameters
$feature
string
The feature to set.
$value
string
(option) feature value.
$group
string
(option) Group to associate with the feature
Returns
\Zend_Http_UserAgent_AbstractDevice
Affects a feature to a group
setGroup(string $group, string $feature) : \Zend_Http_UserAgent_AbstractDevice
Inherited
Parameters
$feature
string
Feature name
Returns
\Zend_Http_UserAgent_AbstractDevice
setImages()
setImages(array $_images)
Inherited
Parameters
$_images
array
setUserAgent()
setUserAgent(string $userAgent)
Inherited
Parameters
$userAgent
string
Unserialize
unserialize(string $serialized) : void
Inherited
Parameters
$serialized
string
Look for features
_defineFeatures() : array | null
Inherited
Sets all the standard features extracted from the User Agent chain and $this->_server
vars
_getDefaultFeatures() : void
Inherited
Loads the Features Adapter if it's defined in the $config array
Otherwise, nothing is done
_loadFeaturesAdapter() : array
Inherited
Match a user agent string against a list of signatures
_matchAgentAgainstSignatures(string $userAgent, array $signatures) : boolean
InheritedStatic
Parameters
$userAgent
string
$signatures
array
Returns
boolean
Restore object state from array
_restoreFromArray(array $spec) : void
Inherited
Properties
Browser/Device features
$_aFeatures : array
Browser/Device features groups
$_aGroup : array
Browser signature
$_browser : string
Browser version
$_browserVersion : string
Configuration
$_config : array
Image types
$_images : array
Default
array('jpeg', 'gif', 'png', 'pjpeg', 'x-png', 'bmp')
Server variable
$_server : array
User Agent Signatures
$_uaSignatures : array
Default
array('playstation', 'wii', 'libnup')
Static
User Agent chain
$_userAgent : string