public function setCode($code) { // Always use uppercase currency codes internally $this->code = strtoupper(preg_replace('/[^a-zA-Z]/', '', $code)); return $this; }