You are here

protected function MobileDeviceDetection::setMobileHeaders in Mobile Device Detection 8.3

Same name and namespace in other branches
  1. 8.2 src/Object/MobileDeviceDetection.php \Drupal\mobile_device_detection\Object\MobileDeviceDetection::setMobileHeaders()

Set headers.

1 call to MobileDeviceDetection::setMobileHeaders()
MobileDeviceDetection::init in src/Object/MobileDeviceDetection.php
Initialization.

File

src/Object/MobileDeviceDetection.php, line 139

Class

MobileDeviceDetection
MobileDeviceDetection object.

Namespace

Drupal\mobile_device_detection\Object

Code

protected function setMobileHeaders($headers) {
  array_walk($headers, function (&$v, $k) {
    if (substr($k, 0, 5) === 'HTTP_') {
      $this->mobileHeaders[$k] = $v;
    }
  });
}