Mobile browser type matcher

category Zend
package Zend_Http
subpackage UserAgent
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License
inherited_from \Zend_Http_UserAgent_AbstractDevice

 Methods

Constructor

__construct(null|string|array $userAgent = null, array $server = array(), array $config = array()) : void

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.

inherited_from \Zend_Http_UserAgent_AbstractDevice::__construct()

Parameters

$userAgent

$server

$config

Constructor

__construct(null|string|array $userAgent = null, array $server = array(), array $config = array()) : void
Inherited

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.

inherited_from \Zend_Http_UserAgent_Device::__construct()

Parameters

$userAgent

nullstringarray

If array, restores from serialized version

$server

array

$config

array

Extract and sets informations from the User Agent chain

extractFromUserAgent(string $userAgent) : array
InheritedStatic

Parameters

$userAgent

string

User Agent chain

Returns

array

Gets all the browser/device features

getAllFeatures() : array
Inherited
inherited_from \Zend_Http_UserAgent_Device::getAllFeatures()

Returns

array

Gets all the browser/device features' groups

getAllGroups() : array
Inherited
inherited_from \Zend_Http_UserAgent_Device::getAllGroups()

Returns

array

Get the browser type

getBrowser() : string
Inherited
inherited_from \Zend_Http_UserAgent_Device::getBrowser()

Returns

string

Get the browser version

getBrowserVersion() : string
Inherited
inherited_from \Zend_Http_UserAgent_Device::getBrowserVersion()

Returns

string

Gets the value of the current browser/device feature

getFeature(string $feature) : string | null
Inherited
inherited_from \Zend_Http_UserAgent_Device::getFeature()

Parameters

$feature

string

Feature to search

Returns

stringnull

Gets an array of features associated to a group

getGroup(string $group) : array
Inherited
inherited_from \Zend_Http_UserAgent_Device::getGroup()

Parameters

$group

string

Group param

Returns

array

Determine image format support

getImageFormatSupport() : array
inherited_from \Zend_Http_UserAgent_AbstractDevice::getImageFormatSupport()

Returns

array

Retrieve image format support

getImageFormatSupport() : array
Inherited
inherited_from \Zend_Http_UserAgent_Device::getImageFormatSupport()

Returns

array

Get image types

getImages() : \the
Inherited
inherited_from \Zend_Http_UserAgent_Device::getImages()

Returns

\the$_images

Determine markup language expected

getMarkupLanguage($preferredMarkup = null) : \__TYPE__
access public

Parameters

$preferredMarkup

Returns

\__TYPE__

Determine maximum image height supported

getMaxImageHeight() : integer
inherited_from \Zend_Http_UserAgent_AbstractDevice::getMaxImageHeight()

Returns

integer

Get maximum image height supported by this device

getMaxImageHeight() : integer
Inherited
inherited_from \Zend_Http_UserAgent_Device::getMaxImageHeight()

Returns

integer

Determine maximum image width supported

getMaxImageWidth() : integer
inherited_from \Zend_Http_UserAgent_AbstractDevice::getMaxImageWidth()

Returns

integer

Get maximum image width supported by this device

getMaxImageWidth() : integer
Inherited
inherited_from \Zend_Http_UserAgent_Device::getMaxImageWidth()

Returns

integer

Determine physical screen height

getPhysicalScreenHeight() : integer
inherited_from \Zend_Http_UserAgent_AbstractDevice::getPhysicalScreenHeight()

Returns

integer

Get physical screen height of this device

getPhysicalScreenHeight() : integer
Inherited
inherited_from \Zend_Http_UserAgent_Device::getPhysicalScreenHeight()

Returns

integer

Determine physical screen width

getPhysicalScreenWidth() : integer
inherited_from \Zend_Http_UserAgent_AbstractDevice::getPhysicalScreenWidth()

Returns

integer

Get physical screen width of this device

getPhysicalScreenWidth() : integer
Inherited
inherited_from \Zend_Http_UserAgent_Device::getPhysicalScreenWidth()

Returns

integer

Determine preferred markup

getPreferredMarkup() : string
inherited_from \Zend_Http_UserAgent_AbstractDevice::getPreferredMarkup()

Returns

string

Get preferred markup type

getPreferredMarkup() : string
Inherited
inherited_from \Zend_Http_UserAgent_Device::getPreferredMarkup()

Returns

string

Gives the current browser type

getType() : string
inherited_from \Zend_Http_UserAgent_AbstractDevice::getType()

Returns

string

Gets the browser type identifier

getType() : string
Inherited

Returns

string

Get the user agent string

getUserAgent() : string
Inherited
inherited_from \Zend_Http_UserAgent_Device::getUserAgent()

Returns

string

Determine X/HTML support level

getXhtmlSupportLevel() : integer
inherited_from \Zend_Http_UserAgent_AbstractDevice::getXhtmlSupportLevel()

Returns

integer

Get supported X/HTML version

getXhtmlSupportLevel() : integer
Inherited
inherited_from \Zend_Http_UserAgent_Device::getXhtmlSupportLevel()

Returns

integer

Check a feature for the current browser/device.

hasFeature(string $feature) : boolean
Inherited
inherited_from \Zend_Http_UserAgent_Device::hasFeature()

Parameters

$feature

string

The feature to check.

Returns

boolean

Does the device support Flash?

hasFlashSupport() : boolean
inherited_from \Zend_Http_UserAgent_AbstractDevice::hasFlashSupport()

Returns

boolean

Does the device support Flash?

hasFlashSupport() : boolean
Inherited
inherited_from \Zend_Http_UserAgent_Device::hasFlashSupport()

Returns

boolean

Does the device support PDF?

hasPdfSupport() : boolean
inherited_from \Zend_Http_UserAgent_AbstractDevice::hasPdfSupport()

Returns

boolean

Does the device support PDF?

hasPdfSupport() : boolean
Inherited
inherited_from \Zend_Http_UserAgent_Device::hasPdfSupport()

Returns

boolean

Does the device have an associated phone number?

hasPhoneNumber() : boolean
inherited_from \Zend_Http_UserAgent_AbstractDevice::hasPhoneNumber()

Returns

boolean

Does the device have a phone number associated with it?

hasPhoneNumber() : boolean
Inherited
inherited_from \Zend_Http_UserAgent_Device::hasPhoneNumber()

Returns

boolean

Does the device support HTTPS?

httpsSupport() : boolean
inherited_from \Zend_Http_UserAgent_AbstractDevice::httpsSupport()

Returns

boolean

Does the device support HTTPS?

httpsSupport() : boolean
Inherited
inherited_from \Zend_Http_UserAgent_Device::httpsSupport()

Returns

boolean

Comparison of the UserAgent chain and User Agent signatures

match(string $userAgent, array $server) : boolean
Static

Parameters

$userAgent

string

User Agent chain

$server

array

$_SERVER like param

Returns

boolean

Serialize object

serialize() : string
Inherited

Returns

string

setBrowser()

setBrowser(string $browser) 
Inherited

Parameters

$browser

string

setBrowserVersion()

setBrowserVersion(string $browserVersion) 
Inherited

Parameters

$browserVersion

string

Set a feature for the current browser/device.

setFeature(string $feature, string $value = false, string $group = '') : \Zend_Http_UserAgent_AbstractDevice
Inherited

Parameters

$feature

string

The feature to set.

$value

string

(option) feature value.

$group

string

(option) Group to associate with the feature

Returns

\Zend_Http_UserAgent_AbstractDevice

Affects a feature to a group

setGroup(string $group, string $feature) : \Zend_Http_UserAgent_AbstractDevice
Inherited

Parameters

$group

string

Group name

$feature

string

Feature name

Returns

\Zend_Http_UserAgent_AbstractDevice

setImages()

setImages(array $_images) 
Inherited

Parameters

$_images

array

setUserAgent()

setUserAgent(string $userAgent) 
Inherited

Parameters

$userAgent

string

Unserialize

unserialize(string $serialized) : void
Inherited

Parameters

$serialized

string

Retrieve beginning clause of user agent

userAgentStart(string $userAgent) : string
Static

Parameters

$userAgent

string

Returns

string

Look for features

_defineFeatures() : string
inherited_from \Zend_Http_UserAgent_AbstractDevice::_defineFeatures()

Returns

string

Look for features

_defineFeatures() : array | null
Inherited

Returns

arraynull

Sets all the standard features extracted from the User Agent chain and $this->_server vars

_getDefaultFeatures() : void
Inherited

Loads the Features Adapter if it's defined in the $config array Otherwise, nothing is done

_loadFeaturesAdapter() : array
Inherited

Returns

array

Match a user agent string against a list of signatures

_matchAgentAgainstSignatures(string $userAgent, array $signatures) : boolean
InheritedStatic

Parameters

$userAgent

string

$signatures

array

Returns

boolean

Restore object state from array

_restoreFromArray(array $spec) : void
Inherited

Parameters

$spec

array

 Properties

 

Browser/Device features

$_aFeatures : array

Default

array()
 

Browser/Device features groups

$_aGroup : array

Default

array()
 

Browser signature

$_browser : string

Default

''
 

Browser version

$_browserVersion : string

Default

''
 

Configuration

$_config : array

Default

 

$_haTerms

$_haTerms : array

Default

array('midp', 'wml', 'vnd.rim', 'vnd.wap', 'j2me')
Static
 

Image types

$_images : array

Default

array('jpeg', 'gif', 'png', 'pjpeg', 'x-png', 'bmp')
 

Server variable

$_server : array

Default

 

first 4 letters of mobile User Agent chains

$_uaBegin : array

Default

array('w3c ', 'acs-', 'alav', 'alca', 'amoi', 'audi', 'avan', 'benq', 'bird', 'blac', 'blaz', 'brew', 'cell', 'cldc', 'cmd-', 'dang', 'doco', 'eric', 'hipt', 'inno', 'ipaq', 'java', 'jigs', 'kddi', 'keji', 'leno', 'lg-c', 'lg-d', 'lg-g', 'lge-', 'maui', 'maxo', 'midp', 'mits', 'mmef', 'mobi', 'mot-', 'moto', 'mwbp', 'nec-', 'newt', 'noki', 'palm', 'pana', 'pant', 'phil', 'play', 'port', 'prox', 'qwap', 'sage', 'sams', 'sany', 'sch-', 'sec-', 'send', 'seri', 'sgh-', 'shar', 'sie-', 'siem', 'smal', 'smar', 'sony', 'sph-', 'symb', 't-mo', 'teli', 'tim-', 'tosh', 'tsm-', 'upg1', 'upsi', 'vk-v', 'voda', 'wap-', 'wapa', 'wapi', 'wapp', 'wapr', 'webc', 'winw', 'winw', 'xda', 'xda-')
Static
 

User Agent Signatures

$_uaSignatures : array

Default

array('iphone', 'ipod', 'ipad', 'android', 'blackberry', 'opera mini', 'opera mobi', 'palm', 'palmos', 'elaine', 'windows ce', 'icab', '_mms', 'ahong', 'archos', 'armv', 'astel', 'avantgo', 'benq', 'blazer', 'brew', 'com2', 'compal', 'danger', 'pocket', 'docomo', 'epoc', 'ericsson', 'eudoraweb', 'hiptop', 'htc-', 'htc_', 'iemobile', 'iris', 'j-phone', 'kddi', 'kindle', 'lg ', 'lg-', 'lg/', 'lg;lx', 'lge vx', 'lge', 'lge-', 'lge-cx', 'lge-lx', 'lge-mx', 'linux armv', 'maemo', 'midp', 'mini 9.5', 'minimo', 'mob-x', 'mobi', 'mobile', 'mobilephone', 'mot 24', 'mot-', 'motorola', 'n410', 'netfront', 'nintendo wii', 'nintendo', 'nitro', 'nokia', 'novarra-vision', 'nuvifone', 'openweb', 'opwv', 'palmsource', 'pdxgw', 'phone', 'playstation', 'polaris', 'portalmmm', 'qt embedded', 'reqwirelessweb', 'sagem', 'sam-r', 'samsu', 'samsung', 'sec-', 'sec-sgh', 'semc-browser', 'series60', 'series70', 'series80', 'series90', 'sharp', 'sie-m', 'sie-s', 'smartphone', 'sony cmd', 'sonyericsson', 'sprint', 'spv', 'symbian os', 'symbian', 'symbianos', 'telco', 'teleca', 'treo', 'up.browser', 'up.link', 'vodafone', 'vodaphone', 'webos', 'wml', 'windows phone os 7', 'wireless', 'wm5 pie', 'wms pie', 'xiino', 'wap', 'up/', 'psion', 'j2me', 'klondike', 'kbrowser')
Static
 

User Agent chain

$_userAgent : string

Default

 Constants

 

DEFAULT_FEATURES_ADAPTER_CLASSNAME

DEFAULT_FEATURES_ADAPTER_CLASSNAME = 'Zend_Http_UserAgent_Features_Adapter_Browscap' 
 

DEFAULT_FEATURES_ADAPTER_PATH

DEFAULT_FEATURES_ADAPTER_PATH = 'Zend/Http/UserAgent/Features/Adapter/Browscap.php'