Zend Framework  1.12
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
Zend_Http_UserAgent_AbstractDevice Class Reference

Public Member Functions

 __construct ($userAgent=null, array $server=array(), array $config=array())
 Constructor.
 
 serialize ()
 Serialize object.
 
 unserialize ($serialized)
 Unserialize.
 
 getType ()
 Gets the browser type identifier.
 
 hasFeature ($feature)
 Check a feature for the current browser/device.
 
 getFeature ($feature)
 Gets the value of the current browser/device feature.
 
 setFeature ($feature, $value=false, $group= '')
 Set a feature for the current browser/device.
 
 setGroup ($group, $feature)
 Affects a feature to a group.
 
 getGroup ($group)
 Gets an array of features associated to a group.
 
 getAllFeatures ()
 Gets all the browser/device features.
 
 getAllGroups ()
 Gets all the browser/device features' groups.
 
 getImageFormatSupport ()
 Retrieve image format support.
 
 getMaxImageHeight ()
 Get maximum image height supported by this device.
 
 getMaxImageWidth ()
 Get maximum image width supported by this device.
 
 getPhysicalScreenHeight ()
 Get physical screen height of this device.
 
 getPhysicalScreenWidth ()
 Get physical screen width of this device.
 
 getPreferredMarkup ()
 Get preferred markup type.
 
 getXhtmlSupportLevel ()
 Get supported X/HTML version.
 
 hasFlashSupport ()
 Does the device support Flash?
 
 hasPdfSupport ()
 Does the device support PDF?
 
 hasPhoneNumber ()
 Does the device have a phone number associated with it?
 
 httpsSupport ()
 Does the device support HTTPS?
 
 getBrowser ()
 Get the browser type.
 
 getBrowserVersion ()
 Get the browser version.
 
 getUserAgent ()
 Get the user agent string.
 
 getImages ()
 
 setBrowser ($browser)
 
 setBrowserVersion ($browserVersion)
 
 setUserAgent ($userAgent)
 
 setImages ($_images)
 

Static Public Member Functions

static extractFromUserAgent ($userAgent)
 Extract and sets informations from the User Agent chain.
 
- Static Public Member Functions inherited from Zend_Http_UserAgent_Device
static match ($userAgent, $server)
 Attempt to match the user agent.
 

Protected Member Functions

 _restoreFromArray (array $spec)
 Restore object state from array.
 
 _defineFeatures ()
 Look for features.
 
 _getDefaultFeatures ()
 Sets all the standard features extracted from the User Agent chain and $this->_server vars.
 
 _loadFeaturesAdapter ()
 Loads the Features Adapter if it's defined in the $config array Otherwise, nothing is done.
 

Static Protected Member Functions

static _matchAgentAgainstSignatures ($userAgent, $signatures)
 Match a user agent string against a list of signatures.
 

Protected Attributes

 $_browser = ''
 
 $_browserVersion = ''
 
 $_config
 
 $_userAgent
 
 $_server
 
 $_images
 
 $_aFeatures = array()
 
 $_aGroup = array()
 

Constructor & Destructor Documentation

__construct (   $userAgent = null,
array  $server = array(),
array  $config = array() 
)

Constructor.

Parameters
null | string | array$userAgentIf array, restores from serialized version
array$server
array$config
Returns
void

Implements Zend_Http_UserAgent_Device.

Member Function Documentation

_defineFeatures ( )
protected

Look for features.

Returns
array|null
_getDefaultFeatures ( )
protected

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

Returns
void
_loadFeaturesAdapter ( )
protected

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

Parameters
string$browserTypeBrowser type
Returns
array
static _matchAgentAgainstSignatures (   $userAgent,
  $signatures 
)
staticprotected

Match a user agent string against a list of signatures.

Parameters
string$userAgent
array$signatures
Returns
bool
_restoreFromArray ( array  $spec)
protected

Restore object state from array.

Parameters
array$spec
Returns
void
static extractFromUserAgent (   $userAgent)
static

Extract and sets informations from the User Agent chain.

Parameters
string$userAgentUser Agent chain
Returns
array
See Also
http://www.texsoft.it/index.php?c=software&m=sw.php.useragent&l=it

Security level

windows

getAllFeatures ( )

Gets all the browser/device features.

Returns
array

Implements Zend_Http_UserAgent_Device.

getAllGroups ( )

Gets all the browser/device features' groups.

Returns
array

Implements Zend_Http_UserAgent_Device.

getBrowser ( )

Get the browser type.

Returns
string

Implements Zend_Http_UserAgent_Device.

getBrowserVersion ( )

Get the browser version.

Returns
string

Implements Zend_Http_UserAgent_Device.

getFeature (   $feature)

Gets the value of the current browser/device feature.

Parameters
string$featureFeature to search
Returns
string|null

Implements Zend_Http_UserAgent_Device.

getGroup (   $group)

Gets an array of features associated to a group.

Parameters
string$groupGroup param
Returns
array

Implements Zend_Http_UserAgent_Device.

getImageFormatSupport ( )

Retrieve image format support.

Returns
array

Implements Zend_Http_UserAgent_Device.

getImages ( )
Returns
the $_images

Implements Zend_Http_UserAgent_Device.

getMaxImageHeight ( )

Get maximum image height supported by this device.

Returns
int

Implements Zend_Http_UserAgent_Device.

getMaxImageWidth ( )

Get maximum image width supported by this device.

Returns
int

Implements Zend_Http_UserAgent_Device.

getPhysicalScreenHeight ( )

Get physical screen height of this device.

Returns
int

Implements Zend_Http_UserAgent_Device.

getPhysicalScreenWidth ( )

Get physical screen width of this device.

Returns
int

Implements Zend_Http_UserAgent_Device.

getPreferredMarkup ( )

Get preferred markup type.

Returns
string

Implements Zend_Http_UserAgent_Device.

getType ( )
abstract

Gets the browser type identifier.

Returns
string
getUserAgent ( )

Get the user agent string.

Returns
string

Implements Zend_Http_UserAgent_Device.

getXhtmlSupportLevel ( )

Get supported X/HTML version.

Returns
int

Implements Zend_Http_UserAgent_Device.

hasFeature (   $feature)

Check a feature for the current browser/device.

Parameters
string$featureThe feature to check.
Returns
bool

Implements Zend_Http_UserAgent_Device.

hasFlashSupport ( )

Does the device support Flash?

Returns
bool

Implements Zend_Http_UserAgent_Device.

hasPdfSupport ( )

Does the device support PDF?

Returns
bool

Implements Zend_Http_UserAgent_Device.

hasPhoneNumber ( )

Does the device have a phone number associated with it?

Returns
bool

Implements Zend_Http_UserAgent_Device.

httpsSupport ( )

Does the device support HTTPS?

Returns
bool

Implements Zend_Http_UserAgent_Device.

serialize ( )

Serialize object.

Returns
string
setBrowser (   $browser)
Parameters
string$browser
setBrowserVersion (   $browserVersion)
Parameters
string$browserVersion
setFeature (   $feature,
  $value = false,
  $group = '' 
)

Set a feature for the current browser/device.

Parameters
string$featureThe feature to set.
string$value(option) feature value.
string$group(option) Group to associate with the feature
Returns
Zend_Http_UserAgent_AbstractDevice
setGroup (   $group,
  $feature 
)

Affects a feature to a group.

Parameters
string$groupGroup name
string$featureFeature name
Returns
Zend_Http_UserAgent_AbstractDevice
setImages (   $_images)
Parameters
array$_images
setUserAgent (   $userAgent)
Parameters
string$userAgent
unserialize (   $serialized)

Unserialize.

Parameters
string$serialized
Returns
void

Member Data Documentation

$_aFeatures = array()
protected
$_aGroup = array()
protected
$_browser = ''
protected
$_browserVersion = ''
protected
$_config
protected
$_images
protected
Initial value:
= array(
'jpeg',
'gif',
'png',
'pjpeg',
'x-png',
'bmp',
)
$_server
protected
$_userAgent
protected