• Модуль: conversion
  • Путь к файлу: ~/bitrix/modules/conversion/lib/internals/mobiledetect.php
  • Класс: BitrixConversionInternalsfor
  • Вызов: for::match
public function match($regex, $userAgent = null)
    {
        $match = (bool) preg_match(sprintf('#%s#is', $regex), (false === empty($userAgent) ? $userAgent : $this->userAgent), $matches);
        // If positive match is found, store the results for debug.
        if ($match) {
            $this->matchingRegex = $regex;
            $this->matchesArray = $matches;
        }

        return $match;
    }