Http/UserAgent/Offline.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 [email protected] 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_Offline

Package: Zend\Http\UserAgent

Offline browser type matcher

Parent(s)
\Zend_Http_UserAgent_Desktop < \Zend_Http_UserAgent_AbstractDevice
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

Propertyprotectedarray $_aFeatures = array()
Default valuearray()Details
Type
array
Inherited_from
\Zend_Http_UserAgent_AbstractDevice::$$_aFeatures  
Inherited_from
\Zend_Http_UserAgent_Desktop::$$_aFeatures  
Propertyprotectedarray $_aGroup = array()
inherited

Browser/Device features groups

Inherited from: \Zend_Http_UserAgent_AbstractDevice::$$_aGroup\Zend_Http_UserAgent_Desktop::$$_aGroup
Default valuearray()Details
Type
array
Inherited_from
\Zend_Http_UserAgent_AbstractDevice::$$_aGroup  
Inherited_from
\Zend_Http_UserAgent_Desktop::$$_aGroup  
Propertyprotectedstring $_browser = ''
Default value''Details
Type
string
Inherited_from
\Zend_Http_UserAgent_AbstractDevice::$$_browser  
Inherited_from
\Zend_Http_UserAgent_Desktop::$$_browser  
Propertyprotectedstring $_browserVersion = ''
Default value''Details
Type
string
Inherited_from
\Zend_Http_UserAgent_AbstractDevice::$$_browserVersion  
Inherited_from
\Zend_Http_UserAgent_Desktop::$$_browserVersion  
Propertyprotectedarray $_config =
Details
Type
array
Inherited_from
\Zend_Http_UserAgent_AbstractDevice::$$_config  
Inherited_from
\Zend_Http_UserAgent_Desktop::$$_config  
Propertyprotectedarray $_images = array('jpeg', 'gif', 'png', 'pjpeg', 'x-png', 'bmp')
Default valuearray('jpeg', 'gif', 'png', 'pjpeg', 'x-png', 'bmp')Details
Type
array
Inherited_from
\Zend_Http_UserAgent_AbstractDevice::$$_images  
Inherited_from
\Zend_Http_UserAgent_Desktop::$$_images  
Propertyprotectedarray $_server =
Details
Type
array
Inherited_from
\Zend_Http_UserAgent_AbstractDevice::$$_server  
Inherited_from
\Zend_Http_UserAgent_Desktop::$$_server  
Propertyprotectedarray $_uaSignatures = array('wget', 'webzip', 'webcopier', 'downloader', 'superbot', 'offline')
static

User Agent Signatures

Default valuearray('wget', 'webzip', 'webcopier', 'downloader', 'superbot', 'offline')Details
Type
array
Propertyprotectedstring $_userAgent =

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() : array | null
Returns
Type Description
array | null
methodprotected_getDefaultFeatures() : void
inherited

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

Inherited from: \Zend_Http_UserAgent_AbstractDevice::_getDefaultFeatures()\Zend_Http_UserAgent_Desktop::_getDefaultFeatures()
methodprotected_loadFeaturesAdapter() : array
inherited

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

Inherited from: \Zend_Http_UserAgent_AbstractDevice::_loadFeaturesAdapter()\Zend_Http_UserAgent_Desktop::_loadFeaturesAdapter()
Returns
Type Description
array
methodprotected_matchAgentAgainstSignatures(string $userAgent, array $signatures) : bool
staticinherited

Match a user agent string against a list of signatures

Inherited from: \Zend_Http_UserAgent_AbstractDevice::_matchAgentAgainstSignatures()\Zend_Http_UserAgent_Desktop::_matchAgentAgainstSignatures()
Parameters
Name Type Description
$userAgent string
$signatures array
Returns
Type Description
bool
methodprotected_restoreFromArray(array $spec) : void
Parameters
Name Type Description
$spec array
methodpublicextractFromUserAgent(string $userAgent) : array
staticinherited

Extract and sets informations from the User Agent chain

Inherited from: \Zend_Http_UserAgent_AbstractDevice::extractFromUserAgent()\Zend_Http_UserAgent_Desktop::extractFromUserAgent()
Parameters
Name Type Description
$userAgent string

User Agent chain

Returns
Type Description
array
methodpublicgetAllFeatures() : array
Returns
Type Description
array
methodpublicgetAllGroups() : array
inherited

Gets all the browser/device features' groups

Inherited from: \Zend_Http_UserAgent_AbstractDevice::getAllGroups()\Zend_Http_UserAgent_Desktop::getAllGroups()
Returns
Type Description
array
methodpublicgetBrowser() : string
Returns
Type Description
string
methodpublicgetBrowserVersion() : string
Returns
Type Description
string
methodpublicgetFeature(string $feature) : string | null
inherited

Gets the value of the current browser/device feature

Inherited from: \Zend_Http_UserAgent_AbstractDevice::getFeature()\Zend_Http_UserAgent_Desktop::getFeature()
Parameters
Name Type Description
$feature string

Feature to search

Returns
Type Description
string | null
methodpublicgetGroup(string $group) : array
inherited

Gets an array of features associated to a group

Inherited from: \Zend_Http_UserAgent_AbstractDevice::getGroup()\Zend_Http_UserAgent_Desktop::getGroup()
Parameters
Name Type Description
$group string

Group param

Returns
Type Description
array
methodpublicgetImageFormatSupport() : array
Returns
Type Description
array
methodpublicgetImages() : \the
Returns
Type Description
\the $_images
methodpublicgetMaxImageHeight() : int
inherited

Get maximum image height supported by this device

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

Get maximum image width supported by this device

Inherited from: \Zend_Http_UserAgent_AbstractDevice::getMaxImageWidth()\Zend_Http_UserAgent_Desktop::getMaxImageWidth()
Returns
Type Description
int
methodpublicgetPhysicalScreenHeight() : int
Returns
Type Description
int
methodpublicgetPhysicalScreenWidth() : int
Returns
Type Description
int
methodpublicgetPreferredMarkup() : string
Returns
Type Description
string
methodpublicgetType() : string

Gives the current browser type

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

Check a feature for the current browser/device.

Inherited from: \Zend_Http_UserAgent_AbstractDevice::hasFeature()\Zend_Http_UserAgent_Desktop::hasFeature()
Parameters
Name Type Description
$feature string

The feature to check.

Returns
Type Description
bool
methodpublichasFlashSupport() : bool
Returns
Type Description
bool
methodpublichasPdfSupport() : bool
Returns
Type Description
bool
methodpublichasPhoneNumber() : bool
inherited

Does the device have a phone number associated with it?

Inherited from: \Zend_Http_UserAgent_AbstractDevice::hasPhoneNumber()\Zend_Http_UserAgent_Desktop::hasPhoneNumber()
Returns
Type Description
bool
methodpublichttpsSupport() : bool
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
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
inherited

Set a feature for the current browser/device.

Inherited from: \Zend_Http_UserAgent_AbstractDevice::setFeature()\Zend_Http_UserAgent_Desktop::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
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 phpDocumentor 2.0.0a8.