src/AbstractMediawikiObject.php
public function validateResponse(Response $response)
	{
		$xml = simplexml_load_string($response->body);

		if (isset($xml->warnings))
		{
			throw new \DomainException($xml->warnings->info);
		}

		if (isset($xml->error))
		{
			throw new \DomainException($xml->error['info']);
		}

		return $xml;
	}
public function validateResponse(Response $response)
	{
		$xml = simplexml_load_string($response->body);

		if (isset($xml->warnings))
		{
			throw new \DomainException($xml->warnings->info);
		}

		if (isset($xml->error))
		{
			throw new \DomainException($xml->error['info']);
		}

		return $xml;
	}
public function validateResponse ( Response $ response ) { $ xml = simplexml_load_string ( $ response -> body ) ; if ( isset ( $ xml -> warnings ) ) { throw new \ DomainException ( $ xml -> warnings -> info ) ; } if ( isset ( $ xml -> error ) ) { throw new \ DomainException ( $ xml -> error [ 'info' ] ) ; } return $ xml ; }
Method to validate response for errors

@param   Response  $response  The response from the mediawiki server.

@return  \SimpleXMLElement

@since   1.0
@throws  \DomainException
Method to validate response for errors