public static function EnvironmentDetectBySystemConfig (array $environmentsSectionData = []) {
		$environment = NULL;
		$app = self::$app ?: self::$app = & \MvcCore\Application::GetInstance();
		$request = $app->GetRequest();
		$clientIp = NULL;
		$serverHostName = NULL;
		$serverGlobals = NULL;
		foreach ((array) $environmentsSectionData as $environmentName => $environmentSection) {
			$sectionData = static::envDetectParseSysConfigEnvSectionData($environmentSection);
			$detected = static::envDetectBySystemConfigEnvSection(
				$sectionData, $request, $clientIp, $serverHostName, $serverGlobals
			);
			if ($detected) {
				$environment = $environmentName;
				break;
			}
		}
		if ($environment && !static::$environment) {
			static::SetEnvironment($environment);
		} else if (!static::$environment) {
			static::SetEnvironment('production');
		}
		return static::$environment;
	}
public static function EnvironmentDetectBySystemConfig (array $environmentsSectionData = []) {
		$environment = NULL;
		$app = self::$app ?: self::$app = & \MvcCore\Application::GetInstance();
		$request = $app->GetRequest();
		$clientIp = NULL;
		$serverHostName = NULL;
		$serverGlobals = NULL;
		foreach ((array) $environmentsSectionData as $environmentName => $environmentSection) {
			$sectionData = static::envDetectParseSysConfigEnvSectionData($environmentSection);
			$detected = static::envDetectBySystemConfigEnvSection(
				$sectionData, $request, $clientIp, $serverHostName, $serverGlobals
			);
			if ($detected) {
				$environment = $environmentName;
				break;
			}
		}
		if ($environment && !static::$environment) {
			static::SetEnvironment($environment);
		} else if (!static::$environment) {
			static::SetEnvironment('production');
		}
		return static::$environment;
	}
public static function EnvironmentDetectBySystemConfig ( array $ environmentsSectionData = [ ] ) { $ environment = NULL ; $ app = self :: $ app ? : self :: $ app = & \ MvcCore \ Application :: GetInstance ( ) ; $ request = $ app -> GetRequest ( ) ; $ clientIp = NULL ; $ serverHostName = NULL ; $ serverGlobals = NULL ; foreach ( ( array ) $ environmentsSectionData as $ environmentName => $ environmentSection ) { $ sectionData = static :: envDetectParseSysConfigEnvSectionData ( $ environmentSection ) ; $ detected = static :: envDetectBySystemConfigEnvSection ( $ sectionData , $ request , $ clientIp , $ serverHostName , $ serverGlobals ) ; if ( $ detected ) { $ environment = $ environmentName ; break ; } } if ( $ environment && ! static :: $ environment ) { static :: SetEnvironment ( $ environment ) ; } else if ( ! static :: $ environment ) { static :: SetEnvironment ( 'production' ) ; } return static :: $ environment ; }
Second environment value setup - by system config data environment record.
@param array $environmentsSectionData System config environment section data part.
@return string Detected environment string.
Second environment value setup - by system config data environment record .