PHP Class ValueObjects\Geography\Street

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

Protected Properties

Свойство Type Description
$elements Building, floor and unit
$format __toString() format Use properties corresponding placeholders: %name%, %number%, %elements%
$name ValueObjects\StringLiteral\StringLiteral
$number ValueObjects\StringLiteral\StringLiteral

Méthodes publiques

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

Method Details

__construct() public méthode

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

Returns a string representation of the StringLiteral in the format defined in the constructor
public __toString ( ) : string
Résultat string

fromNative() public static méthode

Returns a new Street from native PHP string name and number.
public static fromNative ( ) : Street
Résultat Street

getElements() public méthode

Returns street elements
public getElements ( ) : ValueObjects\StringLiteral\StringLiteral
Résultat ValueObjects\StringLiteral\StringLiteral

getName() public méthode

Returns street name
public getName ( ) : ValueObjects\StringLiteral\StringLiteral
Résultat ValueObjects\StringLiteral\StringLiteral

getNumber() public méthode

Returns street number
public getNumber ( ) : ValueObjects\StringLiteral\StringLiteral
Résultat ValueObjects\StringLiteral\StringLiteral

sameValueAs() public méthode

Tells whether two Street objects are equal
public sameValueAs ( ValueObjects\ValueObjectInterface $street ) : boolean
$street ValueObjects\ValueObjectInterface
Résultat boolean

Property Details

$elements protected_oe property

Building, floor and unit
protected $elements

$format protected_oe property

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

$name protected_oe property

protected StringLiteral,ValueObjects\StringLiteral $name
Résultat ValueObjects\StringLiteral\StringLiteral

$number protected_oe property

protected StringLiteral,ValueObjects\StringLiteral $number
Résultat ValueObjects\StringLiteral\StringLiteral