You are here

private function MobileDeviceDetection::get 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::get()

Get options.

2 calls to MobileDeviceDetection::get()
MobileDeviceDetection::getBrowser in src/Object/MobileDeviceDetection.php
Get browser.
MobileDeviceDetection::getOperatingSystem in src/Object/MobileDeviceDetection.php
Get operating system.

File

src/Object/MobileDeviceDetection.php, line 266

Class

MobileDeviceDetection
MobileDeviceDetection object.

Namespace

Drupal\mobile_device_detection\Object

Code

private function get($options) {
  foreach ($options as $key => $value) {
    if (!empty($value)) {
      if ($this
        ->match($value)) {
        return $key;
      }
    }
  }
}