protected static function & getConfigInstance ($appRootRelativePath, $systemConfig = FALSE) {
		$app = self::$app ?: self::$app = & \MvcCore\Application::GetInstance();
		$appRoot = self::$appRoot ?: self::$appRoot = $app->GetRequest()->GetAppRoot();
		$fullPath = $appRoot . '/' . str_replace(
			'%appPath%', $app->GetAppDir(), ltrim($appRootRelativePath, '/')
		);
		if (!file_exists($fullPath)) {
			$result = FALSE;
		} else {
			$systemConfigClass = $app->GetConfigClass();
			$result = $systemConfigClass::CreateInstance();
			if (!$result->Read($fullPath, $systemConfig)) 
				$result = FALSE;
		}
		return $result;
	}
protected static function & getConfigInstance ($appRootRelativePath, $systemConfig = FALSE) {
		$app = self::$app ?: self::$app = & \MvcCore\Application::GetInstance();
		$appRoot = self::$appRoot ?: self::$appRoot = $app->GetRequest()->GetAppRoot();
		$fullPath = $appRoot . '/' . str_replace(
			'%appPath%', $app->GetAppDir(), ltrim($appRootRelativePath, '/')
		);
		if (!file_exists($fullPath)) {
			$result = FALSE;
		} else {
			$systemConfigClass = $app->GetConfigClass();
			$result = $systemConfigClass::CreateInstance();
			if (!$result->Read($fullPath, $systemConfig)) 
				$result = FALSE;
		}
		return $result;
	}
protected static function & getConfigInstance ( $ appRootRelativePath , $ systemConfig = FALSE ) { $ app = self :: $ app ? : self :: $ app = & \ MvcCore \ Application :: GetInstance ( ) ; $ appRoot = self :: $ appRoot ? : self :: $ appRoot = $ app -> GetRequest ( ) -> GetAppRoot ( ) ; $ fullPath = $ appRoot . '/' . str_replace ( '%appPath%' , $ app -> GetAppDir ( ) , ltrim ( $ appRootRelativePath , '/' ) ) ; if ( ! file_exists ( $ fullPath ) ) { $ result = FALSE ; } else { $ systemConfigClass = $ app -> GetConfigClass ( ) ; $ result = $ systemConfigClass :: CreateInstance ( ) ; if ( ! $ result -> Read ( $ fullPath , $ systemConfig ) ) $ result = FALSE ; } return $ result ; }
Try to load and parse config file by app root relative path.
If config contains system data, try to detect environment.
@param string $appRootRelativePath
@param bool $systemConfig
@return \MvcCore\Config|\MvcCore\IConfig|bool
Try to load and parse config file by app root relative path . If config contains system data try to detect environment .