PHP Класс Zend_Http_UserAgent_AbstractDevice

Наследование: implements Zend_Http_UserAgent_Device
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_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

Открытые методы

Метод Описание
__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

Защищенные методы

Метод Описание
_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

Описание методов

__construct() публичный Метод

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
Результат void

_defineFeatures() защищенный Метод

Look for features
protected _defineFeatures ( ) : array | null
Результат array | null

_getDefaultFeatures() защищенный Метод

Sets all the standard features extracted from the User Agent chain and $this->_server vars
protected _getDefaultFeatures ( ) : void
Результат void

_loadFeaturesAdapter() защищенный Метод

Loads the Features Adapter if it's defined in the $config array Otherwise, nothing is done
protected _loadFeaturesAdapter ( ) : array
Результат array

_matchAgentAgainstSignatures() защищенный статический Метод

Match a user agent string against a list of signatures
protected static _matchAgentAgainstSignatures ( string $userAgent, array $signatures ) : boolean
$userAgent string
$signatures array
Результат boolean

_restoreFromArray() защищенный Метод

Restore object state from array
protected _restoreFromArray ( array $spec ) : void
$spec array
Результат void

extractFromUserAgent() публичный статический Метод

Extract and sets informations from the User Agent chain
public static extractFromUserAgent ( string $userAgent ) : array
$userAgent string User Agent chain
Результат array

getAllFeatures() публичный Метод

Gets all the browser/device features
public getAllFeatures ( ) : array
Результат array

getAllGroups() публичный Метод

Gets all the browser/device features' groups
public getAllGroups ( ) : array
Результат array

getBrowser() публичный Метод

Get the browser type
public getBrowser ( ) : string
Результат string

getBrowserVersion() публичный Метод

Get the browser version
public getBrowserVersion ( ) : string
Результат string

getFeature() публичный Метод

Gets the value of the current browser/device feature
public getFeature ( string $feature ) : string | null
$feature string Feature to search
Результат string | null

getGroup() публичный Метод

Gets an array of features associated to a group
public getGroup ( string $group ) : array
$group string Group param
Результат array

getImageFormatSupport() публичный Метод

Retrieve image format support
public getImageFormatSupport ( ) : array
Результат array

getImages() публичный Метод

public getImages ( ) : the
Результат the $_images

getMaxImageHeight() публичный Метод

Get maximum image height supported by this device
public getMaxImageHeight ( ) : integer
Результат integer

getMaxImageWidth() публичный Метод

Get maximum image width supported by this device
public getMaxImageWidth ( ) : integer
Результат integer

getPhysicalScreenHeight() публичный Метод

Get physical screen height of this device
public getPhysicalScreenHeight ( ) : integer
Результат integer

getPhysicalScreenWidth() публичный Метод

Get physical screen width of this device
public getPhysicalScreenWidth ( ) : integer
Результат integer

getPreferredMarkup() публичный Метод

Get preferred markup type
public getPreferredMarkup ( ) : string
Результат string

getType() абстрактный публичный Метод

Gets the browser type identifier
abstract public getType ( ) : string
Результат string

getUserAgent() публичный Метод

Get the user agent string
public getUserAgent ( ) : string
Результат string

getXhtmlSupportLevel() публичный Метод

Get supported X/HTML version
public getXhtmlSupportLevel ( ) : integer
Результат integer

hasFeature() публичный Метод

Check a feature for the current browser/device.
public hasFeature ( string $feature ) : boolean
$feature string The feature to check.
Результат boolean

hasFlashSupport() публичный Метод

Does the device support Flash?
public hasFlashSupport ( ) : boolean
Результат boolean

hasPdfSupport() публичный Метод

Does the device support PDF?
public hasPdfSupport ( ) : boolean
Результат boolean

hasPhoneNumber() публичный Метод

Does the device have a phone number associated with it?
public hasPhoneNumber ( ) : boolean
Результат boolean

httpsSupport() публичный Метод

Does the device support HTTPS?
public httpsSupport ( ) : boolean
Результат boolean

serialize() публичный Метод

Serialize object
public serialize ( ) : string
Результат string

setBrowser() публичный Метод

public setBrowser ( string $browser )
$browser string

setBrowserVersion() публичный Метод

public setBrowserVersion ( string $browserVersion )
$browserVersion string

setFeature() публичный Метод

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
Результат Zend_Http_UserAgent_AbstractDevice

setGroup() публичный Метод

Affects a feature to a group
public setGroup ( string $group, string $feature ) : Zend_Http_UserAgent_AbstractDevice
$group string Group name
$feature string Feature name
Результат Zend_Http_UserAgent_AbstractDevice

setImages() публичный Метод

public setImages ( array $_images )
$_images array

setUserAgent() публичный Метод

public setUserAgent ( string $userAgent )
$userAgent string

unserialize() публичный Метод

Unserialize
public unserialize ( string $serialized ) : void
$serialized string
Результат void

Описание свойств

$_aFeatures защищенное свойство

Browser/Device features
protected array $_aFeatures
Результат array

$_aGroup защищенное свойство

Browser/Device features groups
protected array $_aGroup
Результат array

$_browser защищенное свойство

Browser signature
protected string $_browser
Результат string

$_browserVersion защищенное свойство

Browser version
protected string $_browserVersion
Результат string

$_config защищенное свойство

Configuration
protected array $_config
Результат array

$_images защищенное свойство

Image types
protected array $_images
Результат array

$_server защищенное свойство

Server variable
protected array $_server
Результат array

$_userAgent защищенное свойство

User Agent chain
protected string $_userAgent
Результат string