You are here

protected function MobileDeviceDetectionObject::setMobileHeaders in Mobile Device Detection 8

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

File

src/Object/MobileDeviceDetectionObject.php, line 112

Class

MobileDeviceDetectionObject

Namespace

Drupal\mobile_device_detection\Object

Code

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