/** * Set the currency of the monetary value represented by this * object * * @param string|null $currency * @return $this */ public function setCurrency($currency) { if ($currency) { $currency = strtoupper($currency); Currency::getNumericCode($currency); // ensure currency support $this->currency = $currency; } else { $this->currency = null; } return $this; }