API Documentation

Http/UserAgent/Mobile.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_Mobile

Mobile browser type matcher

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

Constants

Constant  DEFAULT_FEATURES_ADAPTER_CLASSNAME = 'Zend_Http_UserAgent_Features_Adapter_WurflApi'
Constant  DEFAULT_FEATURES_ADAPTER_PATH = 'Zend/Http/UserAgent/Features/Adapter/WurflApi.php'

Properties

Propertyprotectedarray  $_haTerms= 'array'
static

Default valuearrayDetails
Type
array
Propertyprotectedarray  $_uaBegin= 'array'
static

first 4 letters of mobile User Agent chains

Default valuearrayDetails
Type
array
Propertyprotectedarray  $_uaSignatures= 'array'
static

User Agent Signatures

Default valuearrayDetails
Type
array

Methods

methodpublic__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.

Parameters
Name Type Description
$userAgent null|string|array If array, restores from serialized version
$server array
$config array
methodprotected_defineFeatures( ) : string

Look for features

Returns
Type Description
string
methodprotected_getDefaultFeatures( ) : void

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

Inherited from: \Zend_Http_UserAgent_AbstractDevice::_getDefaultFeatures()
methodprotected_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()
Returns
Type Description
array
methodprotected_matchAgentAgainstSignatures( string $userAgent, array $signatures ) : bool
static

Match a user agent string against a list of signatures

Inherited from: \Zend_Http_UserAgent_AbstractDevice::_matchAgentAgainstSignatures()
Parameters
Name Type Description
$userAgent string
$signatures array
Returns
Type Description
bool
methodprotected_restoreFromArray( array $spec ) : void

Restore object state from array

Inherited from: \Zend_Http_UserAgent_AbstractDevice::_restoreFromArray()
Parameters
Name Type Description
$spec array
methodpublicextractFromUserAgent( string $userAgent ) : array
static

Extract and sets informations from the User Agent chain

Inherited from: \Zend_Http_UserAgent_AbstractDevice::extractFromUserAgent()
Parameters
Name Type Description
$userAgent string User Agent chain
Returns
Type Description
array
methodpublicgetAllFeatures( ) : array

Gets all the browser/device features

Inherited from: \Zend_Http_UserAgent_AbstractDevice::getAllFeatures()
Returns
Type Description
array
methodpublicgetAllGroups( ) : array

Gets all the browser/device features' groups

Inherited from: \Zend_Http_UserAgent_AbstractDevice::getAllGroups()
Returns
Type Description
array
methodpublicgetBrowser( ) : string

Get the browser type

Inherited from: \Zend_Http_UserAgent_AbstractDevice::getBrowser()
Returns
Type Description
string
methodpublicgetBrowserVersion( ) : string

Get the browser version

Inherited from: \Zend_Http_UserAgent_AbstractDevice::getBrowserVersion()
Returns
Type Description
string
methodpublicgetFeature( string $feature ) : string|null

Gets the value of the current browser/device feature

Inherited from: \Zend_Http_UserAgent_AbstractDevice::getFeature()
Parameters
Name Type Description
$feature string Feature to search
Returns
Type Description
stringnull
methodpublicgetGroup( string $group ) : array

Gets an array of features associated to a group

Inherited from: \Zend_Http_UserAgent_AbstractDevice::getGroup()
Parameters
Name Type Description
$group string Group param
Returns
Type Description
array
methodpublicgetImageFormatSupport( ) : array

Determine image format support

Returns
Type Description
array
methodpublicgetImages( ) : \the

Get image types

Inherited from: \Zend_Http_UserAgent_AbstractDevice::getImages()
Returns
Type Description
\the $_images
methodpublicgetMarkupLanguage(  $preferredMarkup = null ) : \__TYPE__

Determine markup language expected

Parameters
Name Type Description
$preferredMarkup
Returns
Type Description
\__TYPE__
Details
access
public  
methodpublicgetMaxImageHeight( ) : int

Determine maximum image height supported

Returns
Type Description
int
methodpublicgetMaxImageWidth( ) : int

Determine maximum image width supported

Returns
Type Description
int
methodpublicgetPhysicalScreenHeight( ) : int

Determine physical screen height

Returns
Type Description
int
methodpublicgetPhysicalScreenWidth( ) : int

Determine physical screen width

Returns
Type Description
int
methodpublicgetPreferredMarkup( ) : string

Determine preferred markup

Returns
Type Description
string
methodpublicgetType( ) : string

Gives the current browser type

Returns
Type Description
string
methodpublicgetUserAgent( ) : string

Get the user agent string

Inherited from: \Zend_Http_UserAgent_AbstractDevice::getUserAgent()
Returns
Type Description
string
methodpublicgetXhtmlSupportLevel( ) : int

Determine X/HTML support level

Returns
Type Description
int
methodpublichasFeature( string $feature ) : bool

Check a feature for the current browser/device.

Inherited from: \Zend_Http_UserAgent_AbstractDevice::hasFeature()
Parameters
Name Type Description
$feature string The feature to check.
Returns
Type Description
bool
methodpublichasFlashSupport( ) : bool

Does the device support Flash?

Returns
Type Description
bool
methodpublichasPdfSupport( ) : bool

Does the device support PDF?

Returns
Type Description
bool
methodpublichasPhoneNumber( ) : bool

Does the device have an associated phone number?

Returns
Type Description
bool
methodpublichttpsSupport( ) : bool

Does the device support HTTPS?

Returns
Type Description
bool
methodpublicmatch( string $userAgent, array $server ) : bool
static

Comparison of the UserAgent chain and User Agent signatures

Return either an array of browser signature strings, or a boolean.

Parameters
Name Type Description
$userAgent string User Agent chain
$server array

$_SERVER like param

Returns
Type Description
bool
methodpublicserialize( ) : string

Serialize object

Inherited from: \Zend_Http_UserAgent_AbstractDevice::serialize()
Returns
Type Description
string
methodpublicsetBrowser( string $browser ) : void
Parameters
Name Type Description
$browser string
methodpublicsetBrowserVersion( string $browserVersion ) : void
Parameters
Name Type Description
$browserVersion string
methodpublicsetFeature( 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()
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
Type Description
\Zend_Http_UserAgent_AbstractDevice
methodpublicsetGroup( string $group, string $feature ) : \Zend_Http_UserAgent_AbstractDevice

Affects a feature to a group

Inherited from: \Zend_Http_UserAgent_AbstractDevice::setGroup()
Parameters
Name Type Description
$group string Group name
$feature string Feature name
Returns
Type Description
\Zend_Http_UserAgent_AbstractDevice
methodpublicsetImages( array $_images ) : void
Parameters
Name Type Description
$_images array
methodpublicsetUserAgent( string $userAgent ) : void
Parameters
Name Type Description
$userAgent string
methodpublicunserialize( string $serialized ) : void
Parameters
Name Type Description
$serialized string
methodpublicuserAgentStart( string $userAgent ) : string
static

Retrieve beginning clause of user agent

Parameters
Name Type Description
$userAgent string
Returns
Type Description
string
Documentation was generated by DocBlox 0.13.3.