• Модуль: conversion
  • Путь к файлу: ~/bitrix/modules/conversion/lib/internals/mobiledetect.php
  • Класс: BitrixConversionInternalsfor
  • Вызов: for::matchDetectionRulesAgainstUA
protected function matchDetectionRulesAgainstUA($userAgent = null)
    {
        // Begin general search.
        foreach ($this->getRules() as $_regex) {
            if (empty($_regex)) {
                continue;
            }

            if ($this->match($_regex, $userAgent)) {
                return true;
            }
        }

        return false;
    }