API Documentation

Http/UserAgent/Text.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_Text

Text 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  

Properties

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

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( ) : null

Determine supported image formats

Returns
Type Description
null
methodpublicgetImages( ) : \the

Get image types

Inherited from: \Zend_Http_UserAgent_AbstractDevice::getImages()
Returns
Type Description
\the $_images
methodpublicgetMaxImageHeight( ) : int

Get maximum image height supported by this device

Inherited from: \Zend_Http_UserAgent_AbstractDevice::getMaxImageHeight()
Returns
Type Description
int
methodpublicgetMaxImageWidth( ) : int

Get maximum image width supported by this device

Inherited from: \Zend_Http_UserAgent_AbstractDevice::getMaxImageWidth()
Returns
Type Description
int
methodpublicgetPhysicalScreenHeight( ) : int

Get physical screen height of this device

Inherited from: \Zend_Http_UserAgent_AbstractDevice::getPhysicalScreenHeight()
Returns
Type Description
int
methodpublicgetPhysicalScreenWidth( ) : int

Get physical screen width of this device

Inherited from: \Zend_Http_UserAgent_AbstractDevice::getPhysicalScreenWidth()
Returns
Type Description
int
methodpublicgetPreferredMarkup( ) : string

Get preferred markup format

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

Get supported X/HTML markup 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 a phone number associated with it?

Inherited from: \Zend_Http_UserAgent_AbstractDevice::hasPhoneNumber()
Returns
Type Description
bool
methodpublichttpsSupport( ) : bool

Does the device support HTTPS?

Inherited from: \Zend_Http_UserAgent_AbstractDevice::httpsSupport()
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
Documentation was generated by DocBlox 0.13.3.