PHP 클래스 ValueObjects\Geography\Country

상속: implements ValueObjects\ValueObjectInterface
파일 보기 프로젝트 열기: nicolopignatelli/valueobjects 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$code ValueObjects\Geography\CountryCode

공개 메소드들

메소드 설명
__construct ( ValueObjects\Geography\CountryCode $code ) Returns a new Country object
__toString ( ) : string Returns country name as native string
fromNative ( ) : self Returns a new Country object given a native PHP string country code
getCode ( ) : ValueObjects\Geography\CountryCode Returns country code
getName ( ) : StringLiteral Returns country name
sameValueAs ( ValueObjects\ValueObjectInterface $country ) : boolean Tells whether two Country are equal

메소드 상세

__construct() 공개 메소드

Returns a new Country object
public __construct ( ValueObjects\Geography\CountryCode $code )
$code ValueObjects\Geography\CountryCode

__toString() 공개 메소드

Returns country name as native string
public __toString ( ) : string
리턴 string

fromNative() 공개 정적인 메소드

Returns a new Country object given a native PHP string country code
public static fromNative ( ) : self
리턴 self

getCode() 공개 메소드

Returns country code
public getCode ( ) : ValueObjects\Geography\CountryCode
리턴 ValueObjects\Geography\CountryCode

getName() 공개 메소드

Returns country name
public getName ( ) : StringLiteral
리턴 StringLiteral

sameValueAs() 공개 메소드

Tells whether two Country are equal
public sameValueAs ( ValueObjects\ValueObjectInterface $country ) : boolean
$country ValueObjects\ValueObjectInterface
리턴 boolean

프로퍼티 상세

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

protected CountryCode,ValueObjects\Geography $code
리턴 ValueObjects\Geography\CountryCode