PHP 클래스 CommerceGuys\Addressing\LocaleHelper

파일 보기 프로젝트 열기: commerceguys/addressing 1 사용 예제들

공개 메소드들

메소드 설명
canonicalize ( string $locale = null ) : string Canonicalize the given locale.
getVariants ( string $locale ) : array Gets all variants of a locale.
match ( string $firstLocale, string $secondLocale ) : boolean Checks whether the two locales match.

메소드 상세

canonicalize() 공개 정적인 메소드

Canonicalize the given locale.
public static canonicalize ( string $locale = null ) : string
$locale string The locale.
리턴 string The canonicalized locale.

getVariants() 공개 정적인 메소드

For example, "bs-Cyrl-BA" has the following variants: 1) bs-Cyrl-BA 2) bs-Cyrl 3) bs
public static getVariants ( string $locale ) : array
$locale string The locale (i.e. fr-FR).
리턴 array An array of all variants of a locale.

match() 공개 정적인 메소드

Checks whether the two locales match.
public static match ( string $firstLocale, string $secondLocale ) : boolean
$firstLocale string The first locale.
$secondLocale string The second locale.
리턴 boolean TRUE if the locales match, FALSE otherwise.