CurrencyCode

CurrencyCode

category

System

package

Shared

Methods

Constructor

__construct(\StringType $code, \DecimalType $currencyValue = null) 

Validates the parameter and saves it to the property in uppercase format.

Throws
\InvalidArgumentException

if Argument is not exactly 3 letters

Arguments

$code

\StringType

The currency Code (e.g. EUR)

$currencyValue

\DecimalType

Value of the currency

Get Code

getCode() : string

Returns the currency code as a string.

Response

string

Get Currency Value

getCurrencyValue() : \DecimalType

Returns the currency value as a decimal type.

Response

\DecimalType

Properties

Holds the currency code as a string.

code : string
var

Type(s)

string

Holds the currency value as a decimal type.

currencyValue : float
var

Type(s)

float