Class luya\web\jsonld\CurrencyValue
Inheritance | luya\web\jsonld\CurrencyValue » luya\web\jsonld\BaseValue |
---|---|
Available since version | 1.0.14 |
Source Code | https://github.com/luyadev/luya/blob/master/core/web/jsonld/CurrencyValue.php |
The currency accepted.
Use standard formats: ISO 4217 currency format e.g. "USD"; Ticker symbol for cryptocurrencies e.g. "BTC"; well known names for Local Exchange Tradings Systems (LETS) and other currency types e.g. "Ithaca HOUR".
Public Methods
Method | Description | Defined By |
---|---|---|
__construct() | luya\web\jsonld\CurrencyValue | |
getValue() | luya\web\jsonld\CurrencyValue |
Method Details
public void __construct ( $currency ) | ||
$currency |
public function __construct($currency)
{
if (strlen($currency) !== 3) {
throw new InvalidConfigException("The currency value must have 3 letter code like USD, CHF. Value \"{$currency}\" given.");
}
$this->_currency = $currency;
}