Zend Framework
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.
Bot browser type matcher

__construct(
null|string|array $userAgent
=
null, array $server
=
array, array $config
=
array
)
:
void
Constructor
Inherited from: \Zend_Http_UserAgent_AbstractDevice::__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|null
Look for features
Inherited from: \Zend_Http_UserAgent_AbstractDevice::_defineFeatures()Type | Description |
---|---|
arraynull |

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

match(
string $userAgent, array $server
)
:
bool
Comparison of the UserAgent chain and browser 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(
)
:
string
Serialize object
Inherited from: \Zend_Http_UserAgent_AbstractDevice::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_AbstractDevice
Set a feature for the current browser/device.
Inherited from: \Zend_Http_UserAgent_AbstractDevice::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_AbstractDevice
Affects a feature to a group
Inherited from: \Zend_Http_UserAgent_AbstractDevice::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
)
:
void
Unserialize
Inherited from: \Zend_Http_UserAgent_AbstractDevice::unserialize()Name | Type | Description |
---|---|---|
$serialized | string |