src/FS/File/Block/Reader.php
protected function readBlocks()
	{
		$open	= false;
		$file	= new FS_File_Reader( $this->fileName );
		$lines	= $file->readArray();
		foreach( $lines as $line )
		{
			$line	= trim( $line );
			if( $line )
			{
				if( preg_match( $this->patternSection, $line ) )
				{
					$section 	= preg_replace( $this->patternSection, "\\1", $line );
					if( !isset( $this->blocks[$section] ) )
						$this->blocks[$section]	= array();
					$open = true;
				}
				else if( $open )
				{
					$this->blocks[$section][]	= $line;
				}
			}
		}
		foreach( $this->blocks as $section => $block )
			$this->blocks[$section]	= implode( "\n", $block );
	}
protected function readBlocks()
	{
		$open	= false;
		$file	= new FS_File_Reader( $this->fileName );
		$lines	= $file->readArray();
		foreach( $lines as $line )
		{
			$line	= trim( $line );
			if( $line )
			{
				if( preg_match( $this->patternSection, $line ) )
				{
					$section 	= preg_replace( $this->patternSection, "\\1", $line );
					if( !isset( $this->blocks[$section] ) )
						$this->blocks[$section]	= array();
					$open = true;
				}
				else if( $open )
				{
					$this->blocks[$section][]	= $line;
				}
			}
		}
		foreach( $this->blocks as $section => $block )
			$this->blocks[$section]	= implode( "\n", $block );
	}
protected function readBlocks ( ) { $ open = false ; $ file = new FS_File_Reader ( $ this -> fileName ) ; $ lines = $ file -> readArray ( ) ; foreach ( $ lines as $ line ) { $ line = trim ( $ line ) ; if ( $ line ) { if ( preg_match ( $ this -> patternSection , $ line ) ) { $ section = preg_replace ( $ this -> patternSection , "\\1" , $ line ) ; if ( ! isset ( $ this -> blocks [ $ section ] ) ) $ this -> blocks [ $ section ] = array ( ) ; $ open = true ; } else if ( $ open ) { $ this -> blocks [ $ section ] [ ] = $ line ; } } } foreach ( $ this -> blocks as $ section => $ block ) $ this -> blocks [ $ section ] = implode ( "\n" , $ block ) ; }
Reads Block File.
@access		protected
@return		void
Reads Block File .