private function MobileDeviceDetectionObject::_version in Mobile Device Detection 8
2 calls to MobileDeviceDetectionObject::_version()
File
- src/Object/ MobileDeviceDetectionObject.php, line 246 
Class
Namespace
Drupal\mobile_device_detection\ObjectCode
private function _version($name) {
  $properties = (array) $this
    ->getAttributes()
    ->get('properties')[$name];
  foreach ($properties as $value) {
    $pattern = str_replace('[VER]', $this
      ->getAttributes()
      ->get('VER'), $value);
    preg_match(sprintf('#%s#is', $pattern), $this
      ->getUserAgentHeaders(), $matches);
    if (!empty($matches)) {
      $this->object->{$name}[] = $matches;
    }
  }
}