PHP Class ValueObjects\Person\Name

Inheritance: implements ValueObjects\ValueObjectInterface
Afficher le fichier Open project: nicolopignatelli/valueobjects Class Usage Examples

Méthodes publiques

Méthode Description
__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

Method Details

__construct() public méthode

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() public méthode

Returns the full name
public __toString ( ) : string
Résultat string

fromNative() public static méthode

Returns a Name objects form PHP native values
public static fromNative ( ) : Name
Résultat Name

getFirstName() public méthode

Returns the first name
public getFirstName ( ) : ValueObjects\StringLiteral\StringLiteral
Résultat ValueObjects\StringLiteral\StringLiteral

getFullName() public méthode

Returns the full name
public getFullName ( ) : ValueObjects\StringLiteral\StringLiteral
Résultat ValueObjects\StringLiteral\StringLiteral

getLastName() public méthode

Returns the last name
public getLastName ( ) : ValueObjects\StringLiteral\StringLiteral
Résultat ValueObjects\StringLiteral\StringLiteral

getMiddleName() public méthode

Returns the middle name
public getMiddleName ( ) : ValueObjects\StringLiteral\StringLiteral
Résultat ValueObjects\StringLiteral\StringLiteral

sameValueAs() public méthode

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