supportedCountries = $supported; } /** * @param SimpleXMLElement $xml * * @return bool * @throws XmlApiException */ public function process($xml) { if ($xml->rechtstext_country === null) { throw new CountryException( 'No country provided' ); } if (! array_key_exists((string)$xml->rechtstext_country, $this->supportedCountries)) { throw new CountryException( "Country {$xml->rechtstext_country} is not supported" ); } return parent::process($xml); } }