Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct ($userAgent=null, array $server=array(), array $config=array()) | |
getAllFeatures () | |
getAllGroups () | |
hasFeature ($feature) | |
getFeature ($feature) | |
getBrowser () | |
getBrowserVersion () | |
getGroup ($group) | |
getImageFormatSupport () | |
getImages () | |
getMaxImageHeight () | |
getMaxImageWidth () | |
getPhysicalScreenHeight () | |
getPhysicalScreenWidth () | |
getPreferredMarkup () | |
getUserAgent () | |
getXhtmlSupportLevel () | |
hasFlashSupport () | |
hasPdfSupport () | |
hasPhoneNumber () | |
httpsSupport () | |
Static Public Member Functions | |
static | match ($userAgent, $server) |
Definition at line 31 of file Device.php.
__construct | ( | $userAgent = null , |
|
array | $server = array() , |
||
array | $config = array() |
||
) |
Constructor
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.
null | string | array | $userAgent | |
array | $server | |
array | $config |
Implemented in Zend_Http_UserAgent_Mobile, and Zend_Http_UserAgent_AbstractDevice.
getAllFeatures | ( | ) |
getAllGroups | ( | ) |
Get all of the browser/device's features' groups
Implemented in Zend_Http_UserAgent_AbstractDevice.
getBrowser | ( | ) |
getBrowserVersion | ( | ) |
getFeature | ( | $feature | ) |
Get the value of a specific device feature
string | $feature |
Implemented in Zend_Http_UserAgent_AbstractDevice.
getGroup | ( | $group | ) |
Get an array of features associated with a group
string | $group |
Implemented in Zend_Http_UserAgent_AbstractDevice.
getImageFormatSupport | ( | ) |
Retrieve image format support
Implemented in Zend_Http_UserAgent_AbstractDevice, Zend_Http_UserAgent_Mobile, and Zend_Http_UserAgent_Text.
getImages | ( | ) |
getMaxImageHeight | ( | ) |
Get the maximum image height supported by this device
Implemented in Zend_Http_UserAgent_AbstractDevice, and Zend_Http_UserAgent_Mobile.
getMaxImageWidth | ( | ) |
Get the maximum image width supported by this device
Implemented in Zend_Http_UserAgent_AbstractDevice, and Zend_Http_UserAgent_Mobile.
getPhysicalScreenHeight | ( | ) |
Get the physical screen height of this device
Implemented in Zend_Http_UserAgent_AbstractDevice, and Zend_Http_UserAgent_Mobile.
getPhysicalScreenWidth | ( | ) |
Get the physical screen width of this device
Implemented in Zend_Http_UserAgent_AbstractDevice, and Zend_Http_UserAgent_Mobile.
getPreferredMarkup | ( | ) |
Get the preferred markup type
Implemented in Zend_Http_UserAgent_AbstractDevice, Zend_Http_UserAgent_Mobile, and Zend_Http_UserAgent_Text.
getUserAgent | ( | ) |
getXhtmlSupportLevel | ( | ) |
Get supported X/HTML version
Implemented in Zend_Http_UserAgent_AbstractDevice, Zend_Http_UserAgent_Mobile, and Zend_Http_UserAgent_Text.
hasFeature | ( | $feature | ) |
Whether or not the device has a given feature
string | $feature |
Implemented in Zend_Http_UserAgent_AbstractDevice.
hasFlashSupport | ( | ) |
Does the device support Flash?
Implemented in Zend_Http_UserAgent_AbstractDevice, Zend_Http_UserAgent_Mobile, and Zend_Http_UserAgent_Text.
hasPdfSupport | ( | ) |
Does the device support PDF?
Implemented in Zend_Http_UserAgent_AbstractDevice, Zend_Http_UserAgent_Mobile, and Zend_Http_UserAgent_Text.
hasPhoneNumber | ( | ) |
Does the device have a phone number associated with it?
Implemented in Zend_Http_UserAgent_AbstractDevice, and Zend_Http_UserAgent_Mobile.
httpsSupport | ( | ) |
Does the device support HTTPS?
Implemented in Zend_Http_UserAgent_AbstractDevice, and Zend_Http_UserAgent_Mobile.
|
static |
Attempt to match the user agent
Return either an array of browser signature strings, or a boolean.
string | $userAgent | |
array | $server |
Implemented in Zend_Http_UserAgent_Mobile, Zend_Http_UserAgent_Bot, Zend_Http_UserAgent_Checker, Zend_Http_UserAgent_Validator, Zend_Http_UserAgent_Offline, Zend_Http_UserAgent_Feed, Zend_Http_UserAgent_Console, Zend_Http_UserAgent_Text, Zend_Http_UserAgent_Probe, Zend_Http_UserAgent_Email, Zend_Http_UserAgent_Spam, and Zend_Http_UserAgent_Desktop.