supportedTextTypes = $supported; } /** * @param SimpleXMLElement $xml * * @return bool * @throws XmlApiException */ public function process($xml) { if ($xml->rechtstext_type === null) { throw new TextTypeException( "No text type provided" ); } if (! array_key_exists((string)$xml->rechtstext_type, $this->supportedTextTypes) ) { throw new TextTypeException( "The text type provided is not supported" ); } return parent::process($xml); } }