Http/UserAgent/Device.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-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Http
- Subpackage
- UserAgent
\Zend_Http_UserAgent_Device
Package: Zend_Http\UserAgent
Interface defining a browser device type.
- Parent(s)
- \Serializable
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Methods
__construct(null | string | array $userAgent = null, array $server = array(), array $config = array()) : void
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.
ParametersName | Type | Description |
---|---|---|
$userAgent | null | string | array | |
$server | array | |
$config | array |
getFeature(string $feature) : mixed
Get the value of a specific device feature
Parameters
Returns
Name | Type | Description |
---|---|---|
$feature | string |
Type | Description |
---|---|
mixed |
getGroup(string $group) : array
Get an array of features associated with a group
Parameters
Returns
Name | Type | Description |
---|---|---|
$group | string |
Type | Description |
---|---|
array |
getMaxImageHeight() : int
Get the maximum image height supported by this device
Returns
Type | Description |
---|---|
int |
getMaxImageWidth() : int
Get the maximum image width supported by this device
Returns
Type | Description |
---|---|
int |
getPhysicalScreenHeight() : int
Get the physical screen height of this device
Returns
Type | Description |
---|---|
int |
hasFeature(string $feature) : bool
Whether or not the device has a given feature
Parameters
Returns
Name | Type | Description |
---|---|---|
$feature | string |
Type | Description |
---|---|
bool |
hasPhoneNumber() : bool
Does the device have a phone number associated with it?
Returns
Type | Description |
---|---|
bool |