MobileFrontend
Mobile optimised frontend for MediaWiki
|
Detects the properties of the device that's making the request on behalf of the user. More...
Public Member Functions | |
detectDeviceProperties (WebRequest $request, array $server) | |
Report, if possible, the properties of the device that's being used to access the wiki. | |
Detects the properties of the device that's making the request on behalf of the user.
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.
WebRequest | $request | for the current page view. The HTTP headers of this request will be used to determine whether the page view should redirect to mobile |
array | $server | Per the above, the $_SERVER superglobal |
Implemented in MobileFrontend\Devices\AMFDeviceDetector, MobileFrontend\Devices\CustomHeaderDeviceDetector, MobileFrontend\Devices\DeviceDetectorService, and MobileFrontend\Devices\UADeviceDetector.