PHP 클래스 ValueObjects\Person\Name

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

공개 메소드들

메소드 설명
__construct ( ValueObjects\StringLiteral\StringLiteral $first_name, ValueObjects\StringLiteral\StringLiteral $middle_name, ValueObjects\StringLiteral\StringLiteral $last_name ) Returns a Name object
__toString ( ) : string Returns the full name
fromNative ( ) : Name Returns a Name objects form PHP native values
getFirstName ( ) : ValueObjects\StringLiteral\StringLiteral Returns the first name
getFullName ( ) : ValueObjects\StringLiteral\StringLiteral Returns the full name
getLastName ( ) : ValueObjects\StringLiteral\StringLiteral Returns the last name
getMiddleName ( ) : ValueObjects\StringLiteral\StringLiteral Returns the middle name
sameValueAs ( ValueObjects\ValueObjectInterface $name ) : boolean Tells whether two names are equal by comparing their values

메소드 상세

__construct() 공개 메소드

Returns a Name object
public __construct ( ValueObjects\StringLiteral\StringLiteral $first_name, ValueObjects\StringLiteral\StringLiteral $middle_name, ValueObjects\StringLiteral\StringLiteral $last_name )
$first_name ValueObjects\StringLiteral\StringLiteral
$middle_name ValueObjects\StringLiteral\StringLiteral
$last_name ValueObjects\StringLiteral\StringLiteral

__toString() 공개 메소드

Returns the full name
public __toString ( ) : string
리턴 string

fromNative() 공개 정적인 메소드

Returns a Name objects form PHP native values
public static fromNative ( ) : Name
리턴 Name

getFirstName() 공개 메소드

Returns the first name
public getFirstName ( ) : ValueObjects\StringLiteral\StringLiteral
리턴 ValueObjects\StringLiteral\StringLiteral

getFullName() 공개 메소드

Returns the full name
public getFullName ( ) : ValueObjects\StringLiteral\StringLiteral
리턴 ValueObjects\StringLiteral\StringLiteral

getLastName() 공개 메소드

Returns the last name
public getLastName ( ) : ValueObjects\StringLiteral\StringLiteral
리턴 ValueObjects\StringLiteral\StringLiteral

getMiddleName() 공개 메소드

Returns the middle name
public getMiddleName ( ) : ValueObjects\StringLiteral\StringLiteral
리턴 ValueObjects\StringLiteral\StringLiteral

sameValueAs() 공개 메소드

Tells whether two names are equal by comparing their values
public sameValueAs ( ValueObjects\ValueObjectInterface $name ) : boolean
$name ValueObjects\ValueObjectInterface
리턴 boolean