src/FS/File/INI/Editor.php
public function addSection( $sectionName )
	{
		if( !$this->usesSections() )
			throw new RuntimeException( 'Sections are disabled' );
		$lines		= FS_File_Reader::loadArray( $this->fileName );
		$lines[]	= "[".$sectionName."]";
		if( !in_array( $sectionName, $this->sections ) )
			$this->sections[] = $sectionName;
		$result		= FS_File_Writer::saveArray( $this->fileName, $lines );
		$this->read();
		return is_int( $result );
	}
public function addSection( $sectionName )
	{
		if( !$this->usesSections() )
			throw new RuntimeException( 'Sections are disabled' );
		$lines		= FS_File_Reader::loadArray( $this->fileName );
		$lines[]	= "[".$sectionName."]";
		if( !in_array( $sectionName, $this->sections ) )
			$this->sections[] = $sectionName;
		$result		= FS_File_Writer::saveArray( $this->fileName, $lines );
		$this->read();
		return is_int( $result );
	}
public function addSection ( $ sectionName ) { if ( ! $ this -> usesSections ( ) ) throw new RuntimeException ( 'Sections are disabled' ) ; $ lines = FS_File_Reader :: loadArray ( $ this -> fileName ) ; $ lines [ ] = "[" . $ sectionName . "]" ; if ( ! in_array ( $ sectionName , $ this -> sections ) ) $ this -> sections [ ] = $ sectionName ; $ result = FS_File_Writer :: saveArray ( $ this -> fileName , $ lines ) ; $ this -> read ( ) ; return is_int ( $ result ) ; }
Adds a new Section.
@access		public
@param		string		$sectionName	Name of new Section
@return		bool
Adds a new Section .