MobileFrontend
Mobile optimised frontend for MediaWiki
Loading...
Searching...
No Matches
MobileFrontend\Devices\DeviceDetector Interface Reference

Detects the properties of the device that's making the request on behalf of the user. More...

+ Inheritance diagram for MobileFrontend\Devices\DeviceDetector:

Public Member Functions

 detectDeviceProperties (WebRequest $request, array $server)
 Report, if possible, the properties of the device that's being used to access the wiki.
 

Detailed Description

Detects the properties of the device that's making the request on behalf of the user.

See also
DeviceProperties

Member Function Documentation

◆ detectDeviceProperties()

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

Report, if possible, the properties of the device that's being used to access the wiki.

Because WebRequest doesn't currently provide read-only access to the $_SERVER superglobal within its API, it's expected to be passed as additional context.

Parameters
WebRequest$requestfor the current page view. The HTTP headers of this request will be used to determine whether the page view should redirect to mobile
array$serverPer the above, the $_SERVER superglobal
Returns
DeviceProperties|null

Implemented in MobileFrontend\Devices\AMFDeviceDetector, MobileFrontend\Devices\CustomHeaderDeviceDetector, MobileFrontend\Devices\DeviceDetectorService, and MobileFrontend\Devices\UADeviceDetector.


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