MediaWiki  REL1_20
DeviceDetection Class Reference

Provides abstraction for a device. More...

Inheritance diagram for DeviceDetection:
Collaboration diagram for DeviceDetection:

List of all members.

Public Member Functions

 detectDevice ($userAgent, $acceptHeader= '')
 detectDeviceName ($userAgent, $acceptHeader= '')
 detectDeviceProperties ($userAgent, $acceptHeader= '')
 detectFormatName ($userAgent, $acceptHeader= '')
 getCssFiles ()
 getDevice ($formatName)
 getDeviceProperties ($deviceName)

Static Public Member Functions

static factory ()
 Returns an instance of detection class, overridable by extensions.

Static Private Attributes

static $formats

Detailed Description

Provides abstraction for a device.

A device can select which format a request should receive and may be extended to provide access to particular device functionality.

Since:
1.20

Definition at line 122 of file DeviceDetection.php.


Member Function Documentation

DeviceDetection::detectDevice ( userAgent,
acceptHeader = '' 
)
Deprecated:
: Deprecated, will be removed once detectDeviceProperties() will be deployed everywhere on WMF
Parameters:
$userAgent
string$acceptHeader
Returns:
array

Definition at line 301 of file DeviceDetection.php.

References detectFormatName(), and getDevice().

DeviceDetection::detectDeviceName ( userAgent,
acceptHeader = '' 
)
Parameters:
$userAgentstring
$acceptHeaderstring
Returns:
string

Implements IDeviceDetector.

Definition at line 358 of file DeviceDetection.php.

References wfProfileIn(), and wfProfileOut().

Referenced by detectDeviceProperties(), and detectFormatName().

DeviceDetection::detectDeviceProperties ( userAgent,
acceptHeader = '' 
)
Parameters:
$userAgent
string$acceptHeader
Returns:
IDeviceProperties

Implements IDeviceDetector.

Definition at line 311 of file DeviceDetection.php.

References detectDeviceName(), and getDeviceProperties().

DeviceDetection::detectFormatName ( userAgent,
acceptHeader = '' 
)
Deprecated:
: Renamed to detectDeviceName()
Parameters:
$userAgentstring
$acceptHeaderstring
Returns:
string

Definition at line 349 of file DeviceDetection.php.

References detectDeviceName().

Referenced by detectDevice().

static DeviceDetection::factory ( ) [static]

Returns an instance of detection class, overridable by extensions.

Returns:
IDeviceDetector

Definition at line 285 of file DeviceDetection.php.

Returns:
array: List of all device-specific stylesheets

Definition at line 449 of file DeviceDetection.php.

References $files.

DeviceDetection::getDevice ( formatName)
Deprecated:
: Deprecated, will be removed once detectDeviceProperties() will be deployed everywhere on WMF
Parameters:
$formatName
Returns:
array

Definition at line 321 of file DeviceDetection.php.

Referenced by detectDevice().

Parameters:
$deviceName
Returns:
IDeviceProperties

Implements IDeviceDetector.

Definition at line 329 of file DeviceDetection.php.

Referenced by detectDeviceProperties().


Member Data Documentation

DeviceDetection::$formats [static, private]

Definition at line 124 of file DeviceDetection.php.


The documentation for this class was generated from the following file: