Bitrix API

Manager

Class for working with geolocation information.

Table of Contents

Constants

INFO_NOT_AVAILABLE  = null

Methods

cleanCache()  : void
getCityName()  : string|null
Get the full city name.
getCityPostCode()  : string|null
Get the Postal Code, FSA or Zip Code.
getCountryCode()  : string
Get the two letters country code.
getCountryName()  : string
Get the full country name.
getDataResult()  : Result|null
Get the all available information about geolocation.
getGeoPosition()  : array<string|int, mixed>|null
Get geo-position attribute.
getGeoPositionLatitude()  : string
Get the Latitude as signed double.
getGeoPositionLongitude()  : string
Get the Longitude as signed double.
getHandlerAdminConfigHtml()  : string
getHandlerByClassName()  : Base|null
getHandlers()  : array<string|int, Base>
getIspName()  : string
Get the Internet Service Provider (ISP) name.
getOrganizationName()  : string
Get the organization name.
getRealIp()  : string
getTimezoneName()  : string|null
Get the time zone for country and region code combo.
setLogErrors()  : mixed
Turn on / off error logging for debugging purposes.

Constants

INFO_NOT_AVAILABLE

public mixed INFO_NOT_AVAILABLE = null

Methods

cleanCache()

public static cleanCache() : void

getCityName()

Get the full city name.

public static getCityName([string $ip = '' ][, string $lang = '' ]) : string|null
Parameters
$ip : string = ''

Ip address.

$lang : string = ''

Language identifier.

Return values
string|null

getCityPostCode()

Get the Postal Code, FSA or Zip Code.

public static getCityPostCode([string $ip = '' ][, string $lang = '' ]) : string|null
Parameters
$ip : string = ''

Ip address.

$lang : string = ''

Language identifier.

Return values
string|null

getCountryCode()

Get the two letters country code.

public static getCountryCode([string $ip = '' ][, string $lang = '' ]) : string
Parameters
$ip : string = ''

Ip address.

$lang : string = ''

Language identifier.

Return values
string

getCountryName()

Get the full country name.

public static getCountryName([string $ip = '' ][, string $lang = '' ]) : string
Parameters
$ip : string = ''

Ip address.

$lang : string = ''

Language identifier.

Return values
string

getDataResult()

Get the all available information about geolocation.

public static getDataResult([string $ip = '' ][, string $lang = '' ][, array<string|int, mixed> $required = [] ]) : Result|null
Parameters
$ip : string = ''

Ip address.

$lang : string = ''

Language identifier.

$required : array<string|int, mixed> = []

Required fields for result data.

Return values
Result|null

getGeoPosition()

Get geo-position attribute.

public static getGeoPosition([string $ip = '' ][, string $lang = '' ]) : array<string|int, mixed>|null
Parameters
$ip : string = ''

Ip address.

$lang : string = ''

Language identifier.

Return values
array<string|int, mixed>|null

getGeoPositionLatitude()

Get the Latitude as signed double.

public static getGeoPositionLatitude([string $ip = '' ][, string $lang = '' ]) : string
Parameters
$ip : string = ''

Ip address.

$lang : string = ''

Language identifier.

Return values
string

getGeoPositionLongitude()

Get the Longitude as signed double.

public static getGeoPositionLongitude([string $ip = '' ][, string $lang = '' ]) : string
Parameters
$ip : string = ''

Ip address.

$lang : string = ''

Language identifier.

Return values
string

getHandlerAdminConfigHtml()

public static getHandlerAdminConfigHtml(Base $handler) : string
Parameters
$handler : Base
Return values
string

Config HTML for admin interface form.

getHandlerByClassName()

public static getHandlerByClassName(string $className) : Base|null
Parameters
$className : string

. Class name of handler.

Return values
Base|null

Handler.

getHandlers()

public static getHandlers() : array<string|int, Base>
Return values
array<string|int, Base>

Handlers list.

getIspName()

Get the Internet Service Provider (ISP) name.

public static getIspName([string $ip = '' ][, string $lang = '' ]) : string
Parameters
$ip : string = ''

Ip address.

$lang : string = ''

Language identifier.

Return values
string

getOrganizationName()

Get the organization name.

public static getOrganizationName([string $ip = '' ][, string $lang = '' ]) : string
Parameters
$ip : string = ''

Ip address.

$lang : string = ''

Language identifier.

Return values
string

getRealIp()

public static getRealIp() : string
Return values
string

IPv4 address.

getTimezoneName()

Get the time zone for country and region code combo.

public static getTimezoneName([string $ip = '' ][, string $lang = '' ]) : string|null
Parameters
$ip : string = ''

Ip address.

$lang : string = ''

Language identifier.

Return values
string|null

setLogErrors()

Turn on / off error logging for debugging purposes.

public static setLogErrors(bool $isLog) : mixed
Parameters
$isLog : bool

        
On this page

Search results