PHP 클래스 ValueObjects\Geography\Street

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

보호된 프로퍼티들

프로퍼티 타입 설명
$elements Building, floor and unit
$format __toString() format Use properties corresponding placeholders: %name%, %number%, %elements%
$name ValueObjects\StringLiteral\StringLiteral
$number ValueObjects\StringLiteral\StringLiteral

공개 메소드들

메소드 설명
__construct ( ValueObjects\StringLiteral\StringLiteral $name, ValueObjects\StringLiteral\StringLiteral $number, ValueObjects\StringLiteral\StringLiteral $elements = null, ValueObjects\StringLiteral\StringLiteral $format = null ) Returns a new Street object
__toString ( ) : string Returns a string representation of the StringLiteral in the format defined in the constructor
fromNative ( ) : Street Returns a new Street from native PHP string name and number.
getElements ( ) : ValueObjects\StringLiteral\StringLiteral Returns street elements
getName ( ) : ValueObjects\StringLiteral\StringLiteral Returns street name
getNumber ( ) : ValueObjects\StringLiteral\StringLiteral Returns street number
sameValueAs ( ValueObjects\ValueObjectInterface $street ) : boolean Tells whether two Street objects are equal

메소드 상세

__construct() 공개 메소드

Returns a new Street object
public __construct ( ValueObjects\StringLiteral\StringLiteral $name, ValueObjects\StringLiteral\StringLiteral $number, ValueObjects\StringLiteral\StringLiteral $elements = null, ValueObjects\StringLiteral\StringLiteral $format = null )
$name ValueObjects\StringLiteral\StringLiteral
$number ValueObjects\StringLiteral\StringLiteral
$elements ValueObjects\StringLiteral\StringLiteral
$format ValueObjects\StringLiteral\StringLiteral

__toString() 공개 메소드

Returns a string representation of the StringLiteral in the format defined in the constructor
public __toString ( ) : string
리턴 string

fromNative() 공개 정적인 메소드

Returns a new Street from native PHP string name and number.
public static fromNative ( ) : Street
리턴 Street

getElements() 공개 메소드

Returns street elements
public getElements ( ) : ValueObjects\StringLiteral\StringLiteral
리턴 ValueObjects\StringLiteral\StringLiteral

getName() 공개 메소드

Returns street name
public getName ( ) : ValueObjects\StringLiteral\StringLiteral
리턴 ValueObjects\StringLiteral\StringLiteral

getNumber() 공개 메소드

Returns street number
public getNumber ( ) : ValueObjects\StringLiteral\StringLiteral
리턴 ValueObjects\StringLiteral\StringLiteral

sameValueAs() 공개 메소드

Tells whether two Street objects are equal
public sameValueAs ( ValueObjects\ValueObjectInterface $street ) : boolean
$street ValueObjects\ValueObjectInterface
리턴 boolean

프로퍼티 상세

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

Building, floor and unit
protected $elements

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

__toString() format Use properties corresponding placeholders: %name%, %number%, %elements%
protected $format

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

protected StringLiteral,ValueObjects\StringLiteral $name
리턴 ValueObjects\StringLiteral\StringLiteral

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

protected StringLiteral,ValueObjects\StringLiteral $number
리턴 ValueObjects\StringLiteral\StringLiteral