CurrencyCode
in package
CurrencyCode
Tags
Table of Contents
- $code : string
- Holds the currency code as a string.
- $currencyValue : float
- Holds the currency value as a decimal type.
- __construct() : mixed
- Constructor
- getCode() : string
- Get Code
- getCurrencyValue() : DecimalType
- Get Currency Value
Properties
$code
Holds the currency code as a string.
protected
string
$code
$currencyValue
Holds the currency value as a decimal type.
protected
float
$currencyValue
Methods
__construct()
Constructor
public
__construct(StringType $code[, DecimalType $currencyValue = null ]) : mixed
Validates the parameter and saves it to the property in uppercase format.
Parameters
- $code : StringType
-
The currency Code (e.g. EUR)
- $currencyValue : DecimalType = null
-
Value of the currency
Tags
Return values
mixed —getCode()
Get Code
public
getCode() : string
Returns the currency code as a string.
Return values
string —getCurrencyValue()
Get Currency Value
public
getCurrencyValue() : DecimalType
Returns the currency value as a decimal type.