PHP Class Compiler, HamlPHP

Show file Open project: hamlphp/hamlphp Class Usage Examples

Public Methods

Method Description
__construct ( HamlPHP $hamlphp )
getLine ( $index )
getLines ( )
getNextLine ( )
parseFile ( string $fileName ) Compiles haml from a file.
parseLines ( array $rawLines = [] ) Compiles haml from an array of lines.
parseString ( string $rawString ) Compiles haml from a string.
setHamlPhp ( HamlPHP $hamlphp )

Private Methods

Method Description
getIndentLevel ( string $line ) : integer Returns the indent level of a line.
removeEmptyLines ( array $rawLines ) @todo We CANNOT remove empty lines inside some filters (eg the planned markdown filter), actually, i think we shouldn't do this at all

Method Details

__construct() public method

public __construct ( HamlPHP $hamlphp )
$hamlphp HamlPHP

getLine() public method

public getLine ( $index )

getLines() public method

public getLines ( )

getNextLine() public method

public getNextLine ( )

parseFile() public method

Compiles haml from a file.
public parseFile ( string $fileName )
$fileName string

parseLines() public method

Compiles haml from an array of lines.
public parseLines ( array $rawLines = [] )
$rawLines array

parseString() public method

Compiles haml from a string.
public parseString ( string $rawString )
$rawString string

setHamlPhp() public method

public setHamlPhp ( HamlPHP $hamlphp )
$hamlphp HamlPHP