userAuthToken = $userAuthToken; $this->textAllocations = $textAllocations; } /** * @param SimpleXMLElement $xml * * @return bool * @throws XmlApiException */ public function process($xml) { $this->checkConfiguration($this->userAuthToken); if (!isset($this->textAllocations[(string)$xml->rechtstext_type])) { throw new ConfigurationException( 'ConfigurationException: no textAllocations configured' ); } return parent::process($xml); } /** * Check XML for errors. * * @param $userAuthToken * * @return void * @throws ConfigurationException * @since 1.1.0 */ protected function checkConfiguration($userAuthToken) { if (!$userAuthToken) { throw new ConfigurationException( 'ConfigurationException: no userAuthToken configured' ); } } }