MobileFrontend
Mobile optimised frontend for MediaWiki
Loading...
Searching...
No Matches
MobileFrontend\Devices\DeviceDetectorService Class Reference

MobileFrontend's device detector. More...

+ Inheritance diagram for MobileFrontend\Devices\DeviceDetectorService:
+ Collaboration diagram for MobileFrontend\Devices\DeviceDetectorService:

Public Member Functions

 __construct (array $children)
 
 detectDeviceProperties (WebRequest $request, array $server)
 @inheritDoc
 

Static Public Member Functions

static factory (Config $config)
 Given MobileFrontend's configuration, creates a new instance of the device detector.
 

Detailed Description

MobileFrontend's device detector.

Detects the properties of a device by iterating over a list, //in order//, child device detectors until one returns a positive result.

The order of the child device detectors is defined in DeviceDetectorService::factory.

Constructor & Destructor Documentation

◆ __construct()

MobileFrontend\Devices\DeviceDetectorService::__construct ( array $children)
Parameters
DeviceDetector[]$children

Member Function Documentation

◆ detectDeviceProperties()

MobileFrontend\Devices\DeviceDetectorService::detectDeviceProperties ( WebRequest $request,
array $server )

@inheritDoc

Implements MobileFrontend\Devices\DeviceDetector.

◆ factory()

static MobileFrontend\Devices\DeviceDetectorService::factory ( Config $config)
static

Given MobileFrontend's configuration, creates a new instance of the device detector.

If $wgMFAutodetectMobileView is falsy, then no device detection will occur.

Parameters
Config$configcontaining values for MFAutodetectMobileView and MFMobileHeader
Returns
self

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