src/FS/File/Configuration/Reader.php
protected function loadIniFile( $fileName )
	{
		if( self::$iniQuickLoad )
		{
			$array	= parse_ini_file( $fileName, TRUE );
			foreach( $array as $sectionName => $sectionData )
				foreach( $sectionData as $key => $value )
					$this->pairs[$sectionName.".".$key]	= $value;
		}
		else
		{
			$pattern	= '@^(string|integer|int|double|boolean|bool).*$@';
			$reader		= new FS_File_INI_Reader( $fileName, TRUE );
			$comments	= $reader->getComments();
			foreach( $reader->getProperties() as $sectionName => $sectionData )
			{
				foreach( $sectionData as $key => $value )
				{
					if( isset( $comments[$sectionName][$key] ) )
					{
						$matches	= array();
						if( preg_match_all( $pattern, $comments[$sectionName][$key], $matches ) )
						{
							$type		= $matches[1][0];
							settype( $value, $type );
						}
					}
					$this->pairs[$sectionName.".".$key]	= $value;
				}
			}
		}
	}
protected function loadIniFile( $fileName )
	{
		if( self::$iniQuickLoad )
		{
			$array	= parse_ini_file( $fileName, TRUE );
			foreach( $array as $sectionName => $sectionData )
				foreach( $sectionData as $key => $value )
					$this->pairs[$sectionName.".".$key]	= $value;
		}
		else
		{
			$pattern	= '@^(string|integer|int|double|boolean|bool).*$@';
			$reader		= new FS_File_INI_Reader( $fileName, TRUE );
			$comments	= $reader->getComments();
			foreach( $reader->getProperties() as $sectionName => $sectionData )
			{
				foreach( $sectionData as $key => $value )
				{
					if( isset( $comments[$sectionName][$key] ) )
					{
						$matches	= array();
						if( preg_match_all( $pattern, $comments[$sectionName][$key], $matches ) )
						{
							$type		= $matches[1][0];
							settype( $value, $type );
						}
					}
					$this->pairs[$sectionName.".".$key]	= $value;
				}
			}
		}
	}
protected function loadIniFile ( $ fileName ) { if ( self :: $ iniQuickLoad ) { $ array = parse_ini_file ( $ fileName , TRUE ) ; foreach ( $ array as $ sectionName => $ sectionData ) foreach ( $ sectionData as $ key => $ value ) $ this -> pairs [ $ sectionName . "." . $ key ] = $ value ; } else { $ pattern = '@^(string|integer|int|double|boolean|bool).*$@' ; $ reader = new FS_File_INI_Reader ( $ fileName , TRUE ) ; $ comments = $ reader -> getComments ( ) ; foreach ( $ reader -> getProperties ( ) as $ sectionName => $ sectionData ) { foreach ( $ sectionData as $ key => $ value ) { if ( isset ( $ comments [ $ sectionName ] [ $ key ] ) ) { $ matches = array ( ) ; if ( preg_match_all ( $ pattern , $ comments [ $ sectionName ] [ $ key ] , $ matches ) ) { $ type = $ matches [ 1 ] [ 0 ] ; settype ( $ value , $ type ) ; } } $ this -> pairs [ $ sectionName . "." . $ key ] = $ value ; } } } }
Loads Configuration from INI File.
@access		protected
@param		string		$fileName		File Name of Configuration File
@return		void
Loads Configuration from INI File .