iso_code; } /** * @param string $iso_code * @return Currency */ public function setIsoCode(?string $iso_code): Currency { $this->iso_code = $iso_code; return $this; } /** * Returns the inverse exchange rate (how many of the current currency the base unit is worth) * @return string|null */ public function getInverseExchangeRate(): ?string { $tmp = $this->getExchangeRate(); if ($tmp === null || (float) $tmp === 0) { return null; } return bcdiv(1, $tmp, static::PRICE_SCALE); } /** * Returns The exchange rate between this currency and the base currency * (how many base units the current currency is worth) * @return string|null */ public function getExchangeRate(): ?string { return $this->exchange_rate; } /** * @param string|null $exchange_rate * @return Currency */ public function setExchangeRate(?string $exchange_rate): Currency { $this->exchange_rate = $exchange_rate; return $this; } /** * Returns the ID as an string, defined by the element class. * This should have a form like P000014, for a part with ID 14. * * @return string The ID as a string; * */ public function getIDString(): string { return 'C' . $this->getID(); } }