Http/UserAgent/Console.php
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Http
- Subpackage
- UserAgent
\Zend_Http_UserAgent_Console
- Parent(s)
- \Zend_Http_UserAgent_Desktop < \Zend_Http_UserAgent_AbstractDevice
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties

array $_aFeatures = array()array()Details- Type
- array
- Inherited_from
- \Zend_Http_UserAgent_AbstractDevice::$$_aFeatures
- Inherited_from
- \Zend_Http_UserAgent_Desktop::$$_aFeatures

array $_aGroup = array()array()Details- Type
- array
- Inherited_from
- \Zend_Http_UserAgent_AbstractDevice::$$_aGroup
- Inherited_from
- \Zend_Http_UserAgent_Desktop::$$_aGroup

string $_browser = ''''Details- Type
- string
- Inherited_from
- \Zend_Http_UserAgent_AbstractDevice::$$_browser
- Inherited_from
- \Zend_Http_UserAgent_Desktop::$$_browser

string $_browserVersion = ''''Details- Type
- string
- Inherited_from
- \Zend_Http_UserAgent_AbstractDevice::$$_browserVersion
- Inherited_from
- \Zend_Http_UserAgent_Desktop::$$_browserVersion

array $_config- Type
- array
- Inherited_from
- \Zend_Http_UserAgent_AbstractDevice::$$_config
- Inherited_from
- \Zend_Http_UserAgent_Desktop::$$_config

array $_images = array('jpeg', 'gif', 'png', 'pjpeg', 'x-png', 'bmp')array('jpeg', 'gif', 'png', 'pjpeg', 'x-png', 'bmp')Details- Type
- array
- Inherited_from
- \Zend_Http_UserAgent_AbstractDevice::$$_images
- Inherited_from
- \Zend_Http_UserAgent_Desktop::$$_images

array $_server- Type
- array
- Inherited_from
- \Zend_Http_UserAgent_AbstractDevice::$$_server
- Inherited_from
- \Zend_Http_UserAgent_Desktop::$$_server

array $_uaSignatures = array('playstation', 'wii', 'libnup')array('playstation', 'wii', 'libnup')Details- Type
- array

string $_userAgent- Type
- string
- Inherited_from
- \Zend_Http_UserAgent_AbstractDevice::$$_userAgent
- Inherited_from
- \Zend_Http_UserAgent_Desktop::$$_userAgent
Methods

__construct(null | string | array $userAgent = null, array $server = array(), array $config = array()) : voidConstructor
Inherited from: \Zend_Http_UserAgent_AbstractDevice::__construct()\Zend_Http_UserAgent_Desktop::__construct()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.
| Name | Type | Description |
|---|---|---|
| $userAgent | null | string | array | If array, restores from serialized version |
| $server | array | |
| $config | array |

_defineFeatures() : array | nullLook for features
Inherited from: \Zend_Http_UserAgent_AbstractDevice::_defineFeatures()\Zend_Http_UserAgent_Desktop::_defineFeatures()| Type | Description |
|---|---|
| array | null |

_getDefaultFeatures() : voidSets all the standard features extracted from the User Agent chain and $this->_server vars
Inherited from: \Zend_Http_UserAgent_AbstractDevice::_getDefaultFeatures()\Zend_Http_UserAgent_Desktop::_getDefaultFeatures()
_loadFeaturesAdapter() : arrayLoads the Features Adapter if it's defined in the $config array Otherwise, nothing is done
Inherited from: \Zend_Http_UserAgent_AbstractDevice::_loadFeaturesAdapter()\Zend_Http_UserAgent_Desktop::_loadFeaturesAdapter()| Type | Description |
|---|---|
| array |

_matchAgentAgainstSignatures(string $userAgent, array $signatures) : boolMatch a user agent string against a list of signatures
Inherited from: \Zend_Http_UserAgent_AbstractDevice::_matchAgentAgainstSignatures()\Zend_Http_UserAgent_Desktop::_matchAgentAgainstSignatures()| Name | Type | Description |
|---|---|---|
| $userAgent | string | |
| $signatures | array |
| Type | Description |
|---|---|
| bool |

_restoreFromArray(array $spec) : voidRestore object state from array
Inherited from: \Zend_Http_UserAgent_AbstractDevice::_restoreFromArray()\Zend_Http_UserAgent_Desktop::_restoreFromArray()| Name | Type | Description |
|---|---|---|
| $spec | array |

extractFromUserAgent(string $userAgent) : arrayExtract and sets informations from the User Agent chain
Inherited from: \Zend_Http_UserAgent_AbstractDevice::extractFromUserAgent()\Zend_Http_UserAgent_Desktop::extractFromUserAgent()| Name | Type | Description |
|---|---|---|
| $userAgent | string | User Agent chain |
| Type | Description |
|---|---|
| array |

getAllFeatures() : arrayGets all the browser/device features
Inherited from: \Zend_Http_UserAgent_AbstractDevice::getAllFeatures()\Zend_Http_UserAgent_Desktop::getAllFeatures()| Type | Description |
|---|---|
| array |

getAllGroups() : arrayGets all the browser/device features' groups
Inherited from: \Zend_Http_UserAgent_AbstractDevice::getAllGroups()\Zend_Http_UserAgent_Desktop::getAllGroups()| Type | Description |
|---|---|
| array |

getBrowser() : stringGet the browser type
Inherited from: \Zend_Http_UserAgent_AbstractDevice::getBrowser()\Zend_Http_UserAgent_Desktop::getBrowser()| Type | Description |
|---|---|
| string |

getBrowserVersion() : stringGet the browser version
Inherited from: \Zend_Http_UserAgent_AbstractDevice::getBrowserVersion()\Zend_Http_UserAgent_Desktop::getBrowserVersion()| Type | Description |
|---|---|
| string |

getFeature(string $feature) : string | nullGets the value of the current browser/device feature
Inherited from: \Zend_Http_UserAgent_AbstractDevice::getFeature()\Zend_Http_UserAgent_Desktop::getFeature()| Name | Type | Description |
|---|---|---|
| $feature | string | Feature to search |
| Type | Description |
|---|---|
| string | null |

getGroup(string $group) : arrayGets an array of features associated to a group
Inherited from: \Zend_Http_UserAgent_AbstractDevice::getGroup()\Zend_Http_UserAgent_Desktop::getGroup()| Name | Type | Description |
|---|---|---|
| $group | string | Group param |
| Type | Description |
|---|---|
| array |

getImageFormatSupport() : arrayRetrieve image format support
Inherited from: \Zend_Http_UserAgent_AbstractDevice::getImageFormatSupport()\Zend_Http_UserAgent_Desktop::getImageFormatSupport()| Type | Description |
|---|---|
| array |

getImages() : \theGet image types
Inherited from: \Zend_Http_UserAgent_AbstractDevice::getImages()\Zend_Http_UserAgent_Desktop::getImages()| Type | Description |
|---|---|
| \the | $_images |

getMaxImageHeight() : intGet maximum image height supported by this device
Inherited from: \Zend_Http_UserAgent_AbstractDevice::getMaxImageHeight()\Zend_Http_UserAgent_Desktop::getMaxImageHeight()| Type | Description |
|---|---|
| int |

getMaxImageWidth() : intGet maximum image width supported by this device
Inherited from: \Zend_Http_UserAgent_AbstractDevice::getMaxImageWidth()\Zend_Http_UserAgent_Desktop::getMaxImageWidth()| Type | Description |
|---|---|
| int |

getPhysicalScreenHeight() : intGet physical screen height of this device
Inherited from: \Zend_Http_UserAgent_AbstractDevice::getPhysicalScreenHeight()\Zend_Http_UserAgent_Desktop::getPhysicalScreenHeight()| Type | Description |
|---|---|
| int |

getPhysicalScreenWidth() : intGet physical screen width of this device
Inherited from: \Zend_Http_UserAgent_AbstractDevice::getPhysicalScreenWidth()\Zend_Http_UserAgent_Desktop::getPhysicalScreenWidth()| Type | Description |
|---|---|
| int |

getPreferredMarkup() : stringGet preferred markup type
Inherited from: \Zend_Http_UserAgent_AbstractDevice::getPreferredMarkup()\Zend_Http_UserAgent_Desktop::getPreferredMarkup()| Type | Description |
|---|---|
| string |

getUserAgent() : stringGet the user agent string
Inherited from: \Zend_Http_UserAgent_AbstractDevice::getUserAgent()\Zend_Http_UserAgent_Desktop::getUserAgent()| Type | Description |
|---|---|
| string |

getXhtmlSupportLevel() : intGet supported X/HTML version
Inherited from: \Zend_Http_UserAgent_AbstractDevice::getXhtmlSupportLevel()\Zend_Http_UserAgent_Desktop::getXhtmlSupportLevel()| Type | Description |
|---|---|
| int |

hasFeature(string $feature) : boolCheck a feature for the current browser/device.
Inherited from: \Zend_Http_UserAgent_AbstractDevice::hasFeature()\Zend_Http_UserAgent_Desktop::hasFeature()| Name | Type | Description |
|---|---|---|
| $feature | string | The feature to check. |
| Type | Description |
|---|---|
| bool |

hasFlashSupport() : boolDoes the device support Flash?
Inherited from: \Zend_Http_UserAgent_AbstractDevice::hasFlashSupport()\Zend_Http_UserAgent_Desktop::hasFlashSupport()| Type | Description |
|---|---|
| bool |

hasPdfSupport() : boolDoes the device support PDF?
Inherited from: \Zend_Http_UserAgent_AbstractDevice::hasPdfSupport()\Zend_Http_UserAgent_Desktop::hasPdfSupport()| Type | Description |
|---|---|
| bool |

hasPhoneNumber() : boolDoes the device have a phone number associated with it?
Inherited from: \Zend_Http_UserAgent_AbstractDevice::hasPhoneNumber()\Zend_Http_UserAgent_Desktop::hasPhoneNumber()| Type | Description |
|---|---|
| bool |

httpsSupport() : boolDoes the device support HTTPS?
Inherited from: \Zend_Http_UserAgent_AbstractDevice::httpsSupport()\Zend_Http_UserAgent_Desktop::httpsSupport()| Type | Description |
|---|---|
| bool |

match(string $userAgent, array $server) : boolComparison of the UserAgent chain and User Agent signatures
Return either an array of browser signature strings, or a boolean.
| Name | Type | Description |
|---|---|---|
| $userAgent | string | User Agent chain |
| $server | array | $_SERVER like param |
| Type | Description |
|---|---|
| bool |

serialize() : stringSerialize object
Inherited from: \Zend_Http_UserAgent_AbstractDevice::serialize()\Zend_Http_UserAgent_Desktop::serialize()| Type | Description |
|---|---|
| string |

setBrowser(string $browser) : void| Name | Type | Description |
|---|---|---|
| $browser | string |

setBrowserVersion(string $browserVersion) : void| Name | Type | Description |
|---|---|---|
| $browserVersion | string |

setFeature(string $feature, string $value = false, string $group = '') : \Zend_Http_UserAgent_AbstractDeviceSet a feature for the current browser/device.
Inherited from: \Zend_Http_UserAgent_AbstractDevice::setFeature()\Zend_Http_UserAgent_Desktop::setFeature()| Name | Type | Description |
|---|---|---|
| $feature | string | The feature to set. |
| $value | string | (option) feature value. |
| $group | string | (option) Group to associate with the feature |
| Type | Description |
|---|---|
| \Zend_Http_UserAgent_AbstractDevice |

setGroup(string $group, string $feature) : \Zend_Http_UserAgent_AbstractDeviceAffects a feature to a group
Inherited from: \Zend_Http_UserAgent_AbstractDevice::setGroup()\Zend_Http_UserAgent_Desktop::setGroup()| Name | Type | Description |
|---|---|---|
| $group | string | Group name |
| $feature | string | Feature name |
| Type | Description |
|---|---|
| \Zend_Http_UserAgent_AbstractDevice |

setImages(array $_images) : void| Name | Type | Description |
|---|---|---|
| $_images | array |

setUserAgent(string $userAgent) : void| Name | Type | Description |
|---|---|---|
| $userAgent | string |

unserialize(string $serialized) : voidUnserialize
Inherited from: \Zend_Http_UserAgent_AbstractDevice::unserialize()\Zend_Http_UserAgent_Desktop::unserialize()| Name | Type | Description |
|---|---|---|
| $serialized | string |