PHP 클래스 CommerceGuys\Addressing\Subdivision\Subdivision

Subdivisions are hierarchical and can have up to three levels: Administrative Area -> Locality -> Dependent Locality.
파일 보기 프로젝트 열기: commerceguys/addressing 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$children The children.
$code string The subdivision code.
$countryCode string The country code.
$isoCode string The subdivision iso code.
$localCode string The local subdivision code.
$localName string The local subdivision name.
$locale string The locale.
$name string The subdivision name.
$parent Subdivision The parent.
$postalCodePattern string The postal code pattern.
$postalCodePatternType string The postal code pattern type.

공개 메소드들

메소드 설명
__construct ( array $definition ) Creates a new Subdivision instance.
getChildren ( ) : Subdivision[] Gets the subdivision children.
getCode ( ) : string Gets the subdivision code.
getCountryCode ( ) : string Gets the subdivision country code.
getIsoCode ( ) : string Gets the subdivision ISO 3166-2 code.
getLocalCode ( ) : string | null Gets the subdivision local code.
getLocalName ( ) : string | null Gets the subdivision local name.
getLocale ( ) : string | null Gets the subdivision locale.
getName ( ) : string Gets the subdivision name.
getParent ( ) : Subdivision | null Gets the subdivision parent.
getPostalCodePattern ( ) : string | null Gets the postal code pattern.
getPostalCodePatternType ( ) : string | null Gets the postal code pattern type.
hasChildren ( ) : boolean Checks whether the subdivision has children.

메소드 상세

__construct() 공개 메소드

Creates a new Subdivision instance.
public __construct ( array $definition )
$definition array The definition array.

getChildren() 공개 메소드

Gets the subdivision children.
public getChildren ( ) : Subdivision[]
리턴 Subdivision[] The subdivision children.

getCode() 공개 메소드

Represents the subdivision on the formatted address. Could be an abbreviation, such as "CA" for California, or a full string such as "Grand Cayman". This is the value that is stored on the address object. Guaranteed to be in latin script.
public getCode ( ) : string
리턴 string The subdivision code.

getCountryCode() 공개 메소드

This is a CLDR country code, since CLDR includes additional countries for addressing purposes, such as Canary Islands (IC).
public getCountryCode ( ) : string
리턴 string The two-letter country code.

getIsoCode() 공개 메소드

Only defined for administrative areas. Examples: 'US-CA', 'JP-01'.
public getIsoCode ( ) : string
리턴 string The subdivision ISO 3166-2 code.

getLocalCode() 공개 메소드

When a country uses a non-latin script, the local code is the code in that script (Cyrilic in Russia, Chinese in China, etc).
public getLocalCode ( ) : string | null
리턴 string | null The subdivision local code, if defined.

getLocalName() 공개 메소드

When a country uses a non-latin script, the local name is the name in that script (Cyrilic in Russia, Chinese in China, etc).
public getLocalName ( ) : string | null
리턴 string | null The subdivision local name, if defined.

getLocale() 공개 메소드

Used for selecting local subdivision codes/names. Only defined if the subdivision has a local code or name.
public getLocale ( ) : string | null
리턴 string | null The subdivision locale, if defined.

getName() 공개 메소드

Represents the subdivision in dropdowns. Guaranteed to be in latin script.
public getName ( ) : string
리턴 string The subdivision name.

getParent() 공개 메소드

Gets the subdivision parent.
public getParent ( ) : Subdivision | null
리턴 Subdivision | null The parent, or NULL if there is none.

getPostalCodePattern() 공개 메소드

This is a regular expression pattern used to validate postal codes.
public getPostalCodePattern ( ) : string | null
리턴 string | null The postal code pattern.

getPostalCodePatternType() 공개 메소드

Gets the postal code pattern type.
public getPostalCodePatternType ( ) : string | null
리턴 string | null The postal code pattern type.

hasChildren() 공개 메소드

Checks whether the subdivision has children.
public hasChildren ( ) : boolean
리턴 boolean TRUE if the subdivision has children, FALSE otherwise.

프로퍼티 상세

$children 보호되어 있는 프로퍼티

The children.
protected $children

$code 보호되어 있는 프로퍼티

The subdivision code.
protected string $code
리턴 string

$countryCode 보호되어 있는 프로퍼티

The country code.
protected string $countryCode
리턴 string

$isoCode 보호되어 있는 프로퍼티

The subdivision iso code.
protected string $isoCode
리턴 string

$localCode 보호되어 있는 프로퍼티

The local subdivision code.
protected string $localCode
리턴 string

$localName 보호되어 있는 프로퍼티

The local subdivision name.
protected string $localName
리턴 string

$locale 보호되어 있는 프로퍼티

The locale.
protected string $locale
리턴 string

$name 보호되어 있는 프로퍼티

The subdivision name.
protected string $name
리턴 string

$parent 보호되어 있는 프로퍼티

The parent.
protected Subdivision,CommerceGuys\Addressing\Subdivision $parent
리턴 Subdivision

$postalCodePattern 보호되어 있는 프로퍼티

The postal code pattern.
protected string $postalCodePattern
리턴 string

$postalCodePatternType 보호되어 있는 프로퍼티

The postal code pattern type.
protected string $postalCodePatternType
리턴 string