method public

GeoIP2::getDataResult()

Класс: \Bitrix\Main\Service\GeoIp\GeoIP2

Сигнатура

public getDataResult(string $ip[, string $lang = '' ]) : Result|null

Параметры

$ip string
IP-адрес
$lang string = ''
Идентификатор языка

Возвращаемое значение

Result|null

Как применяется в GeoIP2

GeoIP2::getDataResult() — метод класса \Bitrix\Main\Service\GeoIp\GeoIP2 модуля «Главный модуль».

Метод объекта: сначала нужен экземпляр GeoIP2.

use Bitrix\Main\Service\GeoIp\GeoIP2;

/** @var GeoIP2 $object */
$ip = '';
$result = $object->getDataResult($ip);
// $result: Result|null

Другие методы GeoIP2

getDataResult() есть и у других классов модуля «Главный модуль»: Base, Extension, Manager, MaxMind, SypexGeo.

Исходный файл: source/main/lib/service/geoip/geoip2.php:51

Что будем искать? Например,Продвижение