You are here

protected function MobileDeviceDetection::setCloudHeaders 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::setCloudHeaders()

Set cloud headers.

2 calls to MobileDeviceDetection::setCloudHeaders()
MobileDeviceDetection::check in src/Object/MobileDeviceDetection.php
Is checking which kind of device using.
MobileDeviceDetection::init in src/Object/MobileDeviceDetection.php
Initialization.

File

src/Object/MobileDeviceDetection.php, line 157

Class

MobileDeviceDetection
MobileDeviceDetection object.

Namespace

Drupal\mobile_device_detection\Object

Code

protected function setCloudHeaders($headers) {
  array_walk($headers, function (&$v, $k) {
    if (substr(strtolower($k), 0, 16) === 'http_cloudfront_') {
      $this->cloudHeaders[strtoupper($k)] = $v;
    }
  });
}