src/Framework.php
public static function getXml($data, $isFile = true)
	{
		// Disable libxml errors and allow to fetch error information as needed
		libxml_use_internal_errors(true);

		if ($isFile) {
			// Try to load the XML file
			$xml = simplexml_load_file($data);
		} else {
			// Try to load the XML string
			$xml = simplexml_load_string($data);
		}

		if ($xml === false) {
			$message = null;
			if ($isFile) {
				$message = Text::_('FILE') . ': ' . $data;
			}
			foreach (libxml_get_errors() as $error) {
				if ($message) {
					$message .= ' ';
				}
				$message .= ' '. Text::_('MESSAGE') . ': ' . $error->message;
			}
			throw new RuntimeException(Text::_('ERROR_XML_LOAD') . ' : ' . $message);
		}
		return $xml;
	}
public static function getXml($data, $isFile = true)
	{
		// Disable libxml errors and allow to fetch error information as needed
		libxml_use_internal_errors(true);

		if ($isFile) {
			// Try to load the XML file
			$xml = simplexml_load_file($data);
		} else {
			// Try to load the XML string
			$xml = simplexml_load_string($data);
		}

		if ($xml === false) {
			$message = null;
			if ($isFile) {
				$message = Text::_('FILE') . ': ' . $data;
			}
			foreach (libxml_get_errors() as $error) {
				if ($message) {
					$message .= ' ';
				}
				$message .= ' '. Text::_('MESSAGE') . ': ' . $error->message;
			}
			throw new RuntimeException(Text::_('ERROR_XML_LOAD') . ' : ' . $message);
		}
		return $xml;
	}
public static function getXml ( $ data , $ isFile = true ) { // Disable libxml errors and allow to fetch error information as needed libxml_use_internal_errors ( true ) ; if ( $ isFile ) { // Try to load the XML file $ xml = simplexml_load_file ( $ data ) ; } else { // Try to load the XML string $ xml = simplexml_load_string ( $ data ) ; } if ( $ xml === false ) { $ message = null ; if ( $ isFile ) { $ message = Text :: _ ( 'FILE' ) . ': ' . $ data ; } foreach ( libxml_get_errors ( ) as $ error ) { if ( $ message ) { $ message .= ' ' ; } $ message .= ' ' . Text :: _ ( 'MESSAGE' ) . ': ' . $ error -> message ; } throw new RuntimeException ( Text :: _ ( 'ERROR_XML_LOAD' ) . ' : ' . $ message ) ; } return $ xml ; }
Checks to see if a JFusion plugin is properly configured

@param string  $data   file path or file content
@param boolean $isFile load from file

@throws \Symfony\Component\Yaml\Exception\RuntimeException
@return SimpleXMLElement returns true if plugin is correctly configured
Checks to see if a JFusion plugin is properly configured