You are here

protected function MobileDeviceDetection::setMobileHeaders in Mobile Device Detection 8.2

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

File

src/Object/MobileDeviceDetection.php, line 114

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;
    }
  });
}