Http/UserAgent/AbstractDevice.php
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.
- category
- Zend
- copyright
- Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
- license
-
New BSD License
- package
- Zend_Http
- subpackage
- UserAgent
\Zend_Http_UserAgent_AbstractDevice
Abstract Class to define a browser device.
- Implements
- \Zend_Http_UserAgent_Device
- category
- Zend
- copyright
- Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
- license
-
New BSD License
- package
- Zend_Http
- subpackage
- UserAgent
Properties



array
$_aGroup= 'array'
Browser/Device features groups
Default valuearray
Details
- Type
- array
Methods



_matchAgentAgainstSignatures(
string $userAgent, array $signatures
)
:
bool
staticMatch a user agent string against a list of signatures
Parameters
Name |
Type |
Description |
$userAgent |
string |
|
$signatures |
array |
|
Returns



_restoreFromArray(
array $spec
)
:
void
Restore object state from array
Parameters
Name |
Type |
Description |
$spec |
array |
|



extractFromUserAgent(
string $userAgent
)
:
array
staticExtract and sets informations from the User Agent chain
Parameters
Name |
Type |
Description |
$userAgent |
string |
User Agent chain |
Returns



getFeature(
string $feature
)
:
string|null
Gets the value of the current browser/device feature
Parameters
Name |
Type |
Description |
$feature |
string |
Feature to search |
Returns
Type |
Description |
stringnull |
|



getGroup(
string $group
)
:
array
Gets an array of features associated to a group
Parameters
Name |
Type |
Description |
$group |
string |
Group param |
Returns



hasFeature(
string $feature
)
:
bool
Check a feature for the current browser/device.
Parameters
Name |
Type |
Description |
$feature |
string |
The feature to check. |
Returns



setFeature(
string $feature, string $value
=
false, string $group
)
:
\Zend_Http_UserAgent_AbstractDevice
Set a feature for the current browser/device.
Parameters
Name |
Type |
Description |
$feature |
string |
The feature to set. |
$value |
string |
(option) feature value.
|
$group |
string |
(option) Group to associate with the feature
|
Returns



setGroup(
string $group, string $feature
)
:
\Zend_Http_UserAgent_AbstractDevice
Affects a feature to a group
Parameters
Name |
Type |
Description |
$group |
string |
Group name |
$feature |
string |
Feature name |
Returns