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 float|null */ public function getInverseExchangeRate(): ?float { $tmp = $this->getExchangeRate(); if ($tmp == null) { return null; } return 1 / $tmp; } /** * Returns The exchange rate between this currency and the base currency * (how many base units the current currency is worth) * @return float|null */ public function getExchangeRate(): ?float { return $this->exchange_rate; } /** * @param float|null $exchange_rate * @return Currency */ public function setExchangeRate(?float $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(); } }