protected static function envDetectParseSysConfigEnvSectionData ($environmentSection) {
		$data = (object) [
			'clientIps' => (object) [
				'check'		=> FALSE,
				'values'	=> [], 
				'regExeps'	=> []
			],
			'serverHostNames' => (object) [
				'check'		=> FALSE,
				'values'	=> [], 
				'regExeps'	=> []
			],
			'serverVariables' => (object) [
				'check'		=> FALSE,
				'existence'	=> [], 
				'values'	=> [], 
				'regExeps'	=> []
			]
		];
		if (is_string($environmentSection) && strlen($environmentSection) > 0) {
			// if there is only string provided, value is probably only
			// about the most and simple way - to describe client IPS:
			static::envDetectParseSysConfigClientIps($data, $environmentSection);
		} else if (is_array($environmentSection) || $environmentSection instanceof \stdClass) {
			foreach ((array) $environmentSection as $key => $value) {
				if (is_numeric($key) || $key == 'clients') {
					// if key is only numeric key provided, value is probably
					// only one regular expression to match client IP or 
					// the strings list with the most and simple way - to describe client IPS:
					// of if key has `clients` value, there could be list of clients IPs
					// or list of clients IPs regular expressions
					static::envDetectParseSysConfigClientIps($data, $value);
				} else if ($key == 'servers') {
					// if key is `servers`, there could be string with single regular
					// expression to match hostname or string with comma separated hostnames
					// or list with hostnames and hostname regular expressions
					static::envDetectParseSysConfigServerNames($data, $value);
				} else if ($key == 'variables') {
					// if key is `variables`, there could be string with `$_SERVER` variable
					// names to check if they exists or key => value object with variable
					// name and value, which could be also regular expression to match
					static::envDetectParseSysConfigVariables($data, $value);
				}
			}
		}
		return $data;
	}
protected static function envDetectParseSysConfigEnvSectionData ($environmentSection) {
		$data = (object) [
			'clientIps' => (object) [
				'check'		=> FALSE,
				'values'	=> [], 
				'regExeps'	=> []
			],
			'serverHostNames' => (object) [
				'check'		=> FALSE,
				'values'	=> [], 
				'regExeps'	=> []
			],
			'serverVariables' => (object) [
				'check'		=> FALSE,
				'existence'	=> [], 
				'values'	=> [], 
				'regExeps'	=> []
			]
		];
		if (is_string($environmentSection) && strlen($environmentSection) > 0) {
			// if there is only string provided, value is probably only
			// about the most and simple way - to describe client IPS:
			static::envDetectParseSysConfigClientIps($data, $environmentSection);
		} else if (is_array($environmentSection) || $environmentSection instanceof \stdClass) {
			foreach ((array) $environmentSection as $key => $value) {
				if (is_numeric($key) || $key == 'clients') {
					// if key is only numeric key provided, value is probably
					// only one regular expression to match client IP or 
					// the strings list with the most and simple way - to describe client IPS:
					// of if key has `clients` value, there could be list of clients IPs
					// or list of clients IPs regular expressions
					static::envDetectParseSysConfigClientIps($data, $value);
				} else if ($key == 'servers') {
					// if key is `servers`, there could be string with single regular
					// expression to match hostname or string with comma separated hostnames
					// or list with hostnames and hostname regular expressions
					static::envDetectParseSysConfigServerNames($data, $value);
				} else if ($key == 'variables') {
					// if key is `variables`, there could be string with `$_SERVER` variable
					// names to check if they exists or key => value object with variable
					// name and value, which could be also regular expression to match
					static::envDetectParseSysConfigVariables($data, $value);
				}
			}
		}
		return $data;
	}
protected static function envDetectParseSysConfigEnvSectionData ( $ environmentSection ) { $ data = ( object ) [ 'clientIps' => ( object ) [ 'check' => FALSE , 'values' => [ ] , 'regExeps' => [ ] ] , 'serverHostNames' => ( object ) [ 'check' => FALSE , 'values' => [ ] , 'regExeps' => [ ] ] , 'serverVariables' => ( object ) [ 'check' => FALSE , 'existence' => [ ] , 'values' => [ ] , 'regExeps' => [ ] ] ] ; if ( is_string ( $ environmentSection ) && strlen ( $ environmentSection ) > 0 ) { // if there is only string provided, value is probably only // about the most and simple way - to describe client IPS: static :: envDetectParseSysConfigClientIps ( $ data , $ environmentSection ) ; } else if ( is_array ( $ environmentSection ) || $ environmentSection instanceof \ stdClass ) { foreach ( ( array ) $ environmentSection as $ key => $ value ) { if ( is_numeric ( $ key ) || $ key == 'clients' ) { // if key is only numeric key provided, value is probably // only one regular expression to match client IP or  // the strings list with the most and simple way - to describe client IPS: // of if key has `clients` value, there could be list of clients IPs // or list of clients IPs regular expressions static :: envDetectParseSysConfigClientIps ( $ data , $ value ) ; } else if ( $ key == 'servers' ) { // if key is `servers`, there could be string with single regular // expression to match hostname or string with comma separated hostnames // or list with hostnames and hostname regular expressions static :: envDetectParseSysConfigServerNames ( $ data , $ value ) ; } else if ( $ key == 'variables' ) { // if key is `variables`, there could be string with `$_SERVER` variable // names to check if they exists or key => value object with variable // name and value, which could be also regular expression to match static :: envDetectParseSysConfigVariables ( $ data , $ value ) ; } } } return $ data ; }
Parse system config environment section data from various declarations
into specific detection structure.
@param mixed $environmentSection
@return \stdClass
Parse system config environment section data from various declarations into specific detection structure .