PHP 클래스 Horde_Nls, horde

This includes common methods for handling language data, timezones, and hostname->country lookups.
저자: Jon Parise ([email protected])
저자: Chuck Hagenbuch ([email protected])
저자: Jan Schneider ([email protected])
저자: Michael Slusarz ([email protected])
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$dnsResolver Net_DNS2_Resolver DNS resolver.

보호된 프로퍼티들

프로퍼티 타입 설명
$_cache array Cached values.

공개 메소드들

메소드 설명
checkCharset ( string $charset ) : boolean Check to see if character set is valid for htmlspecialchars() calls.
getCountryByHost ( string $host, string $datafile = null ) : mixed Get country information from a hostname or IP address.
getCountryISO ( string $code = null ) : mixed Returns either a specific or all ISO-3166 country names.
getLangInfo ( const $item ) : array Get the language info returned by nl_langinfo(), but cache it, to avoid repeated calls.
getLanguageISO ( string $code = null ) : mixed Returns either a specific or all ISO-639 language names.
getLocaleInfo ( ) : array Get the locale info returned by localeconv(), but cache it, to avoid repeated calls.
getTimezones ( ) : array Returns a list of available timezones.
getTimezonesWithAbbreviations ( ) : array Returns a list of available timezones, including timezone abbreviations.
tldLookup ( string $code ) : mixed Do a top level domain (TLD) lookup.

메소드 상세

checkCharset() 공개 정적인 메소드

Check to see if character set is valid for htmlspecialchars() calls.
public static checkCharset ( string $charset ) : boolean
$charset string The character set to check.
리턴 boolean Is charset valid for the current system?

getCountryByHost() 공개 정적인 메소드

Get country information from a hostname or IP address.
public static getCountryByHost ( string $host, string $datafile = null ) : mixed
$host string The hostname or IP address.
$datafile string The datafile for the GeoIP lookup. If not set, will skip this lookup.
리턴 mixed On success, return an array with the following entries: 'code' => Country Code 'name' => Country Name On failure, return false.

getCountryISO() 공개 정적인 메소드

Returns either a specific or all ISO-3166 country names.
public static getCountryISO ( string $code = null ) : mixed
$code string The ISO 3166 country code.
리턴 mixed If a country code has been requested will return the corresponding country name. If empty will return an array of all the country codes and their names.

getLangInfo() 공개 정적인 메소드

Get the language info returned by nl_langinfo(), but cache it, to avoid repeated calls.
public static getLangInfo ( const $item ) : array
$item const The langinfo item to return.
리턴 array The results of nl_langinfo().

getLanguageISO() 공개 정적인 메소드

Returns either a specific or all ISO-639 language names.
public static getLanguageISO ( string $code = null ) : mixed
$code string The ISO 639 language code.
리턴 mixed If a language code has been requested will return the corresponding language name. If empty will return an array of all the language codes (keys) and their names (values).

getLocaleInfo() 공개 정적인 메소드

Get the locale info returned by localeconv(), but cache it, to avoid repeated calls.
public static getLocaleInfo ( ) : array
리턴 array The results of localeconv().

getTimezones() 공개 정적인 메소드

Returns a list of available timezones.
public static getTimezones ( ) : array
리턴 array List of timezones.

getTimezonesWithAbbreviations() 공개 정적인 메소드

Contrary to getTimezones() the timezone IDs are values and the timezone labels are the keys, to allow multiple labels for the same timezone.
부터: 2.2.0
public static getTimezonesWithAbbreviations ( ) : array
리턴 array List of timezones.

tldLookup() 공개 정적인 메소드

Do a top level domain (TLD) lookup.
public static tldLookup ( string $code ) : mixed
$code string A 2-letter country code.
리턴 mixed The localized country name, or null if not found.

프로퍼티 상세

$_cache 보호되어 있는 정적으로 프로퍼티

Cached values.
protected static array $_cache
리턴 array

$dnsResolver 공개적으로 정적으로 프로퍼티

DNS resolver.
public static Net_DNS2_Resolver $dnsResolver
리턴 Net_DNS2_Resolver