PHP Class Money\Currency

Afficher le fichier Open project: ulabox/money Class Usage Examples

Méthodes publiques

Méthode Description
__toString ( ) : string Returns a string representation of the currency, namely its ISO code
code ( ) : string Returns the currency code
equals ( Currency $other ) : boolean Checks whether this currency is the same as an other
fromCode ( string $code ) : Currency Creates a Currency from its code

Private Methods

Méthode Description
__construct ( string $code )

Method Details

__toString() public méthode

Returns a string representation of the currency, namely its ISO code
public __toString ( ) : string
Résultat string

code() public méthode

Returns the currency code
public code ( ) : string
Résultat string

equals() public méthode

Checks whether this currency is the same as an other
public equals ( Currency $other ) : boolean
$other Currency
Résultat boolean

fromCode() public static méthode

Creates a Currency from its code
public static fromCode ( string $code ) : Currency
$code string
Résultat Currency