protected function & iniReadFilterEnvironmentSections (array & $rawIniData, $environment) {
		$iniData = [];
		foreach ($rawIniData as $keyOrSectionName => $valueOrSectionValues) {
			if (is_array($valueOrSectionValues)) {
				if (strpos($keyOrSectionName, '>') !== FALSE) {
					list($envNamesStrLocal, $keyOrSectionName) = explode('>', str_replace(' ', '', $keyOrSectionName));
					if (!in_array($environment, explode(',', $envNamesStrLocal))) continue;
				}
				$sectionValues = [];
				foreach ($valueOrSectionValues as $key => $value) $sectionValues[$keyOrSectionName.'.'.$key] = $value;
				$iniData = array_merge($iniData, $sectionValues);
			} else {
				$iniData[$keyOrSectionName] = $valueOrSectionValues;
			}
		}
		return $iniData;
	}
protected function & iniReadFilterEnvironmentSections (array & $rawIniData, $environment) {
		$iniData = [];
		foreach ($rawIniData as $keyOrSectionName => $valueOrSectionValues) {
			if (is_array($valueOrSectionValues)) {
				if (strpos($keyOrSectionName, '>') !== FALSE) {
					list($envNamesStrLocal, $keyOrSectionName) = explode('>', str_replace(' ', '', $keyOrSectionName));
					if (!in_array($environment, explode(',', $envNamesStrLocal))) continue;
				}
				$sectionValues = [];
				foreach ($valueOrSectionValues as $key => $value) $sectionValues[$keyOrSectionName.'.'.$key] = $value;
				$iniData = array_merge($iniData, $sectionValues);
			} else {
				$iniData[$keyOrSectionName] = $valueOrSectionValues;
			}
		}
		return $iniData;
	}
protected function & iniReadFilterEnvironmentSections ( array & $ rawIniData , $ environment ) { $ iniData = [ ] ; foreach ( $ rawIniData as $ keyOrSectionName => $ valueOrSectionValues ) { if ( is_array ( $ valueOrSectionValues ) ) { if ( strpos ( $ keyOrSectionName , '>' ) !== FALSE ) { list ( $ envNamesStrLocal , $ keyOrSectionName ) = explode ( '>' , str_replace ( ' ' , '' , $ keyOrSectionName ) ) ; if ( ! in_array ( $ environment , explode ( ',' , $ envNamesStrLocal ) ) ) continue ; } $ sectionValues = [ ] ; foreach ( $ valueOrSectionValues as $ key => $ value ) $ sectionValues [ $ keyOrSectionName . '.' . $ key ] = $ value ; $ iniData = array_merge ( $ iniData , $ sectionValues ) ; } else { $ iniData [ $ keyOrSectionName ] = $ valueOrSectionValues ; } } return $ iniData ; }
Align all raw INI data to single level array,
filtered for only current environment data items.
@param array  $rawIniData
@param string $environment
@return array
Align all raw INI data to single level array filtered for only current environment data items .