• Модуль: conversion
  • Путь к файлу: ~/bitrix/modules/conversion/lib/internals/mobiledetect.php
  • Класс: BitrixConversionInternalsfor
  • Вызов: for::checkHttpHeadersForMobile
public function checkHttpHeadersForMobile()
    {

        foreach ($this->getMobileHeaders() as $mobileHeader => $matchType) {
            if (isset($this->httpHeaders[$mobileHeader])) {
                if (is_array($matchType['matches'])) {
                    foreach ($matchType['matches'] as $_match) {
                        if (mb_strpos($this->httpHeaders[$mobileHeader], $_match) !== false) {
                            return true;
                        }
                    }

                    return false;
                } else {
                    return true;
                }
            }
        }

        return false;

    }