PHP Class Zend_Http_UserAgent_AbstractDevice

Inheritance: implements Zend_Http_UserAgent_Device
Afficher le fichier Open project: dbpatch/dbpatch Class Usage Examples

Protected Properties

Свойство Type Description
$_aFeatures array Browser/Device features
$_aGroup array Browser/Device features groups
$_browser string Browser signature
$_browserVersion string Browser version
$_config array Configuration
$_images array Image types
$_server array Server variable
$_userAgent string User Agent chain

Méthodes publiques

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

Méthodes protégées

Méthode Description
_defineFeatures ( ) : array | null Look for features
_getDefaultFeatures ( ) : void Sets all the standard features extracted from the User Agent chain and $this->_server vars
_loadFeaturesAdapter ( ) : array Loads the Features Adapter if it's defined in the $config array Otherwise, nothing is done
_matchAgentAgainstSignatures ( string $userAgent, array $signatures ) : boolean Match a user agent string against a list of signatures
_restoreFromArray ( array $spec ) : void Restore object state from array

Method Details

__construct() public méthode

Constructor
public __construct ( null | string | array $userAgent = null, array $server = [], array $config = [] ) : void
$userAgent null | string | array If array, restores from serialized version
$server array
$config array
Résultat void

_defineFeatures() protected méthode

Look for features
protected _defineFeatures ( ) : array | null
Résultat array | null

_getDefaultFeatures() protected méthode

Sets all the standard features extracted from the User Agent chain and $this->_server vars
protected _getDefaultFeatures ( ) : void
Résultat void

_loadFeaturesAdapter() protected méthode

Loads the Features Adapter if it's defined in the $config array Otherwise, nothing is done
protected _loadFeaturesAdapter ( ) : array
Résultat array

_matchAgentAgainstSignatures() protected static méthode

Match a user agent string against a list of signatures
protected static _matchAgentAgainstSignatures ( string $userAgent, array $signatures ) : boolean
$userAgent string
$signatures array
Résultat boolean

_restoreFromArray() protected méthode

Restore object state from array
protected _restoreFromArray ( array $spec ) : void
$spec array
Résultat void

extractFromUserAgent() public static méthode

Extract and sets informations from the User Agent chain
public static extractFromUserAgent ( string $userAgent ) : array
$userAgent string User Agent chain
Résultat array

getAllFeatures() public méthode

Gets all the browser/device features
public getAllFeatures ( ) : array
Résultat array

getAllGroups() public méthode

Gets all the browser/device features' groups
public getAllGroups ( ) : array
Résultat array

getBrowser() public méthode

Get the browser type
public getBrowser ( ) : string
Résultat string

getBrowserVersion() public méthode

Get the browser version
public getBrowserVersion ( ) : string
Résultat string

getFeature() public méthode

Gets the value of the current browser/device feature
public getFeature ( string $feature ) : string | null
$feature string Feature to search
Résultat string | null

getGroup() public méthode

Gets an array of features associated to a group
public getGroup ( string $group ) : array
$group string Group param
Résultat array

getImageFormatSupport() public méthode

Retrieve image format support
public getImageFormatSupport ( ) : array
Résultat array

getImages() public méthode

public getImages ( ) : the
Résultat the $_images

getMaxImageHeight() public méthode

Get maximum image height supported by this device
public getMaxImageHeight ( ) : integer
Résultat integer

getMaxImageWidth() public méthode

Get maximum image width supported by this device
public getMaxImageWidth ( ) : integer
Résultat integer

getPhysicalScreenHeight() public méthode

Get physical screen height of this device
public getPhysicalScreenHeight ( ) : integer
Résultat integer

getPhysicalScreenWidth() public méthode

Get physical screen width of this device
public getPhysicalScreenWidth ( ) : integer
Résultat integer

getPreferredMarkup() public méthode

Get preferred markup type
public getPreferredMarkup ( ) : string
Résultat string

getType() abstract public méthode

Gets the browser type identifier
abstract public getType ( ) : string
Résultat string

getUserAgent() public méthode

Get the user agent string
public getUserAgent ( ) : string
Résultat string

getXhtmlSupportLevel() public méthode

Get supported X/HTML version
public getXhtmlSupportLevel ( ) : integer
Résultat integer

hasFeature() public méthode

Check a feature for the current browser/device.
public hasFeature ( string $feature ) : boolean
$feature string The feature to check.
Résultat boolean

hasFlashSupport() public méthode

Does the device support Flash?
public hasFlashSupport ( ) : boolean
Résultat boolean

hasPdfSupport() public méthode

Does the device support PDF?
public hasPdfSupport ( ) : boolean
Résultat boolean

hasPhoneNumber() public méthode

Does the device have a phone number associated with it?
public hasPhoneNumber ( ) : boolean
Résultat boolean

httpsSupport() public méthode

Does the device support HTTPS?
public httpsSupport ( ) : boolean
Résultat boolean

serialize() public méthode

Serialize object
public serialize ( ) : string
Résultat string

setBrowser() public méthode

public setBrowser ( string $browser )
$browser string

setBrowserVersion() public méthode

public setBrowserVersion ( string $browserVersion )
$browserVersion string

setFeature() public méthode

Set a feature for the current browser/device.
public setFeature ( string $feature, string $value = false, string $group = '' ) : Zend_Http_UserAgent_AbstractDevice
$feature string The feature to set.
$value string (option) feature value.
$group string (option) Group to associate with the feature
Résultat Zend_Http_UserAgent_AbstractDevice

setGroup() public méthode

Affects a feature to a group
public setGroup ( string $group, string $feature ) : Zend_Http_UserAgent_AbstractDevice
$group string Group name
$feature string Feature name
Résultat Zend_Http_UserAgent_AbstractDevice

setImages() public méthode

public setImages ( array $_images )
$_images array

setUserAgent() public méthode

public setUserAgent ( string $userAgent )
$userAgent string

unserialize() public méthode

Unserialize
public unserialize ( string $serialized ) : void
$serialized string
Résultat void

Property Details

$_aFeatures protected_oe property

Browser/Device features
protected array $_aFeatures
Résultat array

$_aGroup protected_oe property

Browser/Device features groups
protected array $_aGroup
Résultat array

$_browser protected_oe property

Browser signature
protected string $_browser
Résultat string

$_browserVersion protected_oe property

Browser version
protected string $_browserVersion
Résultat string

$_config protected_oe property

Configuration
protected array $_config
Résultat array

$_images protected_oe property

Image types
protected array $_images
Résultat array

$_server protected_oe property

Server variable
protected array $_server
Résultat array

$_userAgent protected_oe property

User Agent chain
protected string $_userAgent
Résultat string