public function setOwnercty($ownercty) { if (!preg_match('/^[A-Z]{2}$/', strtoupper($ownercty))) { throw new InvalidArgumentException("Illegal country code"); } $this->parameters['ownercty'] = strtoupper($ownercty); }