PHP Class Money\Currency

Exibir arquivo Open project: ulabox/money Class Usage Examples

Public Methods

Method 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

Method Description
__construct ( string $code )

Method Details

__toString() public method

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

code() public method

Returns the currency code
public code ( ) : string
return string

equals() public method

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

fromCode() public static method

Creates a Currency from its code
public static fromCode ( string $code ) : Currency
$code string
return Currency