private static function loadXml($url, $user, $pass)
	{
		$e = self::$cacheExpire;
		$cacheFile = self::$cacheDir . '/feed.' . md5(serialize(func_get_args())) . '.xml';

		if (self::$cacheDir
			&& (time() - @filemtime($cacheFile) <= (is_string($e) ? strtotime($e) - time() : $e))
			&& $data = @file_get_contents($cacheFile)
		) {
			// ok
		} elseif ($data = trim(self::httpRequest($url, $user, $pass))) {
			if (self::$cacheDir) {
				file_put_contents($cacheFile, $data);
			}
		} elseif (self::$cacheDir && $data = @file_get_contents($cacheFile)) {
			// ok
		} else {
			throw new FeedException('Cannot load feed.');
		}

		return new SimpleXMLElement($data, LIBXML_NOWARNING | LIBXML_NOERROR);
	}
private static function loadXml($url, $user, $pass)
	{
		$e = self::$cacheExpire;
		$cacheFile = self::$cacheDir . '/feed.' . md5(serialize(func_get_args())) . '.xml';

		if (self::$cacheDir
			&& (time() - @filemtime($cacheFile) <= (is_string($e) ? strtotime($e) - time() : $e))
			&& $data = @file_get_contents($cacheFile)
		) {
			// ok
		} elseif ($data = trim(self::httpRequest($url, $user, $pass))) {
			if (self::$cacheDir) {
				file_put_contents($cacheFile, $data);
			}
		} elseif (self::$cacheDir && $data = @file_get_contents($cacheFile)) {
			// ok
		} else {
			throw new FeedException('Cannot load feed.');
		}

		return new SimpleXMLElement($data, LIBXML_NOWARNING | LIBXML_NOERROR);
	}
private static function loadXml ( $ url , $ user , $ pass ) { $ e = self :: $ cacheExpire ; $ cacheFile = self :: $ cacheDir . '/feed.' . md5 ( serialize ( func_get_args ( ) ) ) . '.xml' ; if ( self :: $ cacheDir && ( time ( ) - @ filemtime ( $ cacheFile ) <= ( is_string ( $ e ) ? strtotime ( $ e ) - time ( ) : $ e ) ) && $ data = @ file_get_contents ( $ cacheFile ) ) { // ok } elseif ( $ data = trim ( self :: httpRequest ( $ url , $ user , $ pass ) ) ) { if ( self :: $ cacheDir ) { file_put_contents ( $ cacheFile , $ data ) ; } } elseif ( self :: $ cacheDir && $ data = @ file_get_contents ( $ cacheFile ) ) { // ok } else { throw new FeedException ( 'Cannot load feed.' ) ; } return new SimpleXMLElement ( $ data , LIBXML_NOWARNING | LIBXML_NOERROR ) ; }
Load XML from cache or HTTP.
@param  string
@param  string
@param  string
@return SimpleXMLElement
@throws FeedException
Load XML from cache or HTTP .