XBRL.php
public static function getXmlInner( $url, $context )
	{
		// In the future the urls of taxonomies may change.  For example
		// 		http://resources.companieshouse.gov.uk/ef/xbrl/gaap/gcd/2004-12-01/uk-gcd-2004-12-01.xsd
		// now maps to:
		// 		http://resources.companieshouse.gov.uk/ef/xbrl/gaap/gcd/2004-12-01/uk-gcd-2004-12-01.xsd
		// This allows an application using this class to remap the address of a taxonomy.
		// $mapUrl is a function that accepts one url parammeter and returns a url.  If the function does
		// not handle mapping for the url passed as an argument then it shoul return the passed url.
		global $mapUrl;
		if ( $mapUrl ) $url = $mapUrl( $url );

		// If caching is not being used or the url is a local file get the file and return it
		if ( ! $context->useCache || ! filter_var( $url, FILTER_VALIDATE_URL ) )
		{
			// Replace the handler because the status test handler traps any error and terminates the session
			$previousHandler = set_error_handler(null);
			$result = @file_get_contents( $url );
			set_error_handler( $previousHandler );
			return $result;
		}

		// Its an HTTP request so get it then cache it and update the map
		$path = $context->findCachedFile( $url );
		if ( $path !== false )
		{
			return @file_get_contents( $path );
		}
		else
		{
			// Get the file and store it updating the map
			// Replace the handler because the status test handler traps any error and terminates the session
			$previousHandler = set_error_handler(null);
			$xml = @file_get_contents( $url );
			set_error_handler( $previousHandler );
			if ( $xml === false)
				return null;

			$context->saveCacheFile( $url, $xml );
			return $xml;

		}
	}
public static function getXmlInner( $url, $context )
	{
		// In the future the urls of taxonomies may change.  For example
		// 		http://resources.companieshouse.gov.uk/ef/xbrl/gaap/gcd/2004-12-01/uk-gcd-2004-12-01.xsd
		// now maps to:
		// 		http://resources.companieshouse.gov.uk/ef/xbrl/gaap/gcd/2004-12-01/uk-gcd-2004-12-01.xsd
		// This allows an application using this class to remap the address of a taxonomy.
		// $mapUrl is a function that accepts one url parammeter and returns a url.  If the function does
		// not handle mapping for the url passed as an argument then it shoul return the passed url.
		global $mapUrl;
		if ( $mapUrl ) $url = $mapUrl( $url );

		// If caching is not being used or the url is a local file get the file and return it
		if ( ! $context->useCache || ! filter_var( $url, FILTER_VALIDATE_URL ) )
		{
			// Replace the handler because the status test handler traps any error and terminates the session
			$previousHandler = set_error_handler(null);
			$result = @file_get_contents( $url );
			set_error_handler( $previousHandler );
			return $result;
		}

		// Its an HTTP request so get it then cache it and update the map
		$path = $context->findCachedFile( $url );
		if ( $path !== false )
		{
			return @file_get_contents( $path );
		}
		else
		{
			// Get the file and store it updating the map
			// Replace the handler because the status test handler traps any error and terminates the session
			$previousHandler = set_error_handler(null);
			$xml = @file_get_contents( $url );
			set_error_handler( $previousHandler );
			if ( $xml === false)
				return null;

			$context->saveCacheFile( $url, $xml );
			return $xml;

		}
	}
public static function getXmlInner ( $ url , $ context ) { // In the future the urls of taxonomies may change.  For example
 // 		http://resources.companieshouse.gov.uk/ef/xbrl/gaap/gcd/2004-12-01/uk-gcd-2004-12-01.xsd
 // now maps to:
 // 		http://resources.companieshouse.gov.uk/ef/xbrl/gaap/gcd/2004-12-01/uk-gcd-2004-12-01.xsd
 // This allows an application using this class to remap the address of a taxonomy.
 // $mapUrl is a function that accepts one url parammeter and returns a url.  If the function does
 // not handle mapping for the url passed as an argument then it shoul return the passed url.
 global $ mapUrl ; if ( $ mapUrl ) $ url = $ mapUrl ( $ url ) ; // If caching is not being used or the url is a local file get the file and return it
 if ( ! $ context -> useCache || ! filter_var ( $ url , FILTER_VALIDATE_URL ) ) { // Replace the handler because the status test handler traps any error and terminates the session
 $ previousHandler = set_error_handler ( null ) ; $ result = @ file_get_contents ( $ url ) ; set_error_handler ( $ previousHandler ) ; return $ result ; } // Its an HTTP request so get it then cache it and update the map
 $ path = $ context -> findCachedFile ( $ url ) ; if ( $ path !== false ) { return @ file_get_contents ( $ path ) ; } else { // Get the file and store it updating the map
 // Replace the handler because the status test handler traps any error and terminates the session
 $ previousHandler = set_error_handler ( null ) ; $ xml = @ file_get_contents ( $ url ) ; set_error_handler ( $ previousHandler ) ; if ( $ xml === false ) return null ; $ context -> saveCacheFile ( $ url , $ xml ) ; return $ xml ; } }
Get the XML for a resource
@param string url The file to access.  Assumes this is a fully qualified file.
@param XBRL_Global $context The singleton containing the global information
@return string|boolean
Get the XML for a resource