API Documentation

Zend/Http/UserAgent/AbstractDevice.php

Show: inherited
Table of Contents

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-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Http  
Subpackage
UserAgent  

\Zend_Http_UserAgent_AbstractDevice

Package: Zend\Http\UserAgent

Abstract Class to define a browser device.

Implements
\Zend_Http_UserAgent_Device
Children
\Zend_Http_UserAgent_Bot
\Zend_Http_UserAgent_Probe
\Zend_Http_UserAgent_Text
\Zend_Http_UserAgent_Feed
\Zend_Http_UserAgent_Desktop
\Zend_Http_UserAgent_Spam
\Zend_Http_UserAgent_Mobile
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

Propertyprotectedarray  $_aFeatures= 'array()'

Browser/Device features

Default valuearray()Details
Type
array
Propertyprotectedarray  $_aGroup= 'array()'

Browser/Device features groups

Default valuearray()Details
Type
array
Propertyprotectedstring  $_browser= ''''

Browser signature

Default value''Details
Type
string
Propertyprotectedstring  $_browserVersion= ''''

Browser version

Default value''Details
Type
string
Propertyprotectedarray  $_config= ''

Configuration

Details
Type
array
Propertyprotectedarray  $_images= 'array( 'jpeg''

Image types

Default valuearray( 'jpeg'Details
Type
array
Propertyprotectedarray  $_server= ''

Server variable

Details
Type
array
Propertyprotectedstring  $_userAgent= ''

User Agent chain

Details
Type
string

Methods

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

Constructor

Parameters
Name Type Description
$userAgent null|string|array

If array, restores from serialized version

$server array
$config array
methodprotected_defineFeatures( ) : array|null

Look for features

Returns
Type Description
array|null
methodprotected_getDefaultFeatures( ) : void

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

methodprotected_loadFeaturesAdapter( ) : array

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

Returns
Type Description
array
methodprotected_matchAgentAgainstSignatures( string $userAgent, array $signatures ) : bool
static

Match a user agent string against a list of signatures

Parameters
Name Type Description
$userAgent string
$signatures array
Returns
Type Description
bool
methodprotected_restoreFromArray( array $spec ) : void

Restore object state from array

Parameters
Name Type Description
$spec array
methodpublicextractFromUserAgent( string $userAgent ) : array
static

Extract and sets informations from the User Agent chain

Parameters
Name Type Description
$userAgent string

User Agent chain

Returns
Type Description
array
methodpublicgetAllFeatures( ) : array

Gets all the browser/device features

Returns
Type Description
array
methodpublicgetAllGroups( ) : array

Gets all the browser/device features' groups

Returns
Type Description
array
methodpublicgetBrowser( ) : string

Get the browser type

Returns
Type Description
string
methodpublicgetBrowserVersion( ) : string

Get the browser version

Returns
Type Description
string
methodpublicgetFeature( 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
string|null
methodpublicgetGroup( string $group ) : array

Gets an array of features associated to a group

Parameters
Name Type Description
$group string

Group param

Returns
Type Description
array
methodpublicgetImageFormatSupport( ) : array

Retrieve image format support

Returns
Type Description
array
methodpublicgetImages( ) : \the

Returns
Type Description
\the $_images
methodpublicgetMaxImageHeight( ) : int

Get maximum image height supported by this device

Returns
Type Description
int
methodpublicgetMaxImageWidth( ) : int

Get maximum image width supported by this device

Returns
Type Description
int
methodpublicgetPhysicalScreenHeight( ) : int

Get physical screen height of this device

Returns
Type Description
int
methodpublicgetPhysicalScreenWidth( ) : int

Get physical screen width of this device

Returns
Type Description
int
methodpublicgetPreferredMarkup( ) : string

Get preferred markup type

Returns
Type Description
string
methodpublicgetType( ) : string
abstract

Gets the browser type identifier

Returns
Type Description
string
methodpublicgetUserAgent( ) : string

Get the user agent string

Returns
Type Description
string
methodpublicgetXhtmlSupportLevel( ) : int

Get supported X/HTML version

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

Check a feature for the current browser/device.

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?

Returns
Type Description
bool
methodpublichttpsSupport( ) : bool

Does the device support HTTPS?

Returns
Type Description
bool
methodpublicserialize( ) : string

Serialize object

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.

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

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

Unserialize

Parameters
Name Type Description
$serialized string
Documentation was generated by DocBlox 0.15.1.