src/FS/File/Configuration/Converter.php
protected static function loadIni( $fileName )
	{
		$reader	= new FS_File_INI_Reader( $fileName, TRUE );
		$ini	= $reader->getCommentedProperties();
		foreach( $ini as $sectionName => $sectionData )
		{
			foreach( $sectionData as $pair )
			{
				$item	= array(
					'key'		=> $pair['key'],
					'value'		=> $pair['value'],
					'type'		=> "string",
				);
				if( isset( $pair['comment'] ) )
				{
					$matches	= array();
					if( preg_match_all( self::$iniTypePattern, $pair['comment'], $matches ) )
					{
						$item['type']		= $matches[1][0];
						if( $matches[2][0] )
							$item['comment']	= $matches[2][0];
						settype( $item['value'], $item['type'] );
					}
					else
						$item['comment']	= $pair['comment'];
				}
				$data[$sectionName][]	= $item;
			}
		}
		return $data;
	}
protected static function loadIni( $fileName )
	{
		$reader	= new FS_File_INI_Reader( $fileName, TRUE );
		$ini	= $reader->getCommentedProperties();
		foreach( $ini as $sectionName => $sectionData )
		{
			foreach( $sectionData as $pair )
			{
				$item	= array(
					'key'		=> $pair['key'],
					'value'		=> $pair['value'],
					'type'		=> "string",
				);
				if( isset( $pair['comment'] ) )
				{
					$matches	= array();
					if( preg_match_all( self::$iniTypePattern, $pair['comment'], $matches ) )
					{
						$item['type']		= $matches[1][0];
						if( $matches[2][0] )
							$item['comment']	= $matches[2][0];
						settype( $item['value'], $item['type'] );
					}
					else
						$item['comment']	= $pair['comment'];
				}
				$data[$sectionName][]	= $item;
			}
		}
		return $data;
	}
protected static function loadIni ( $ fileName ) { $ reader = new FS_File_INI_Reader ( $ fileName , TRUE ) ; $ ini = $ reader -> getCommentedProperties ( ) ; foreach ( $ ini as $ sectionName => $ sectionData ) { foreach ( $ sectionData as $ pair ) { $ item = array ( 'key' => $ pair [ 'key' ] , 'value' => $ pair [ 'value' ] , 'type' => "string" , ) ; if ( isset ( $ pair [ 'comment' ] ) ) { $ matches = array ( ) ; if ( preg_match_all ( self :: $ iniTypePattern , $ pair [ 'comment' ] , $ matches ) ) { $ item [ 'type' ] = $ matches [ 1 ] [ 0 ] ; if ( $ matches [ 2 ] [ 0 ] ) $ item [ 'comment' ] = $ matches [ 2 ] [ 0 ] ; settype ( $ item [ 'value' ] , $ item [ 'type' ] ) ; } else $ item [ 'comment' ] = $ pair [ 'comment' ] ; } $ data [ $ sectionName ] [ ] = $ item ; } } return $ data ; }
Loads Configuration Data from INI File.
@access		protected
@static
@param		string		$fileName		File Name of INI File.
@return		array
Loads Configuration Data from INI File .