PHP Class Latte\Macros\MacroSet

Inheritance: extends Latte\Object, implements Latte\IMacro
Show file Open project: nette/latte Class Usage Examples

Public Methods

Method Description
__construct ( Compiler $compiler )
addMacro ( $name, $begin, $end = NULL, $attr = NULL, $flags = NULL )
finalize ( ) : array(prolog, Finishes template parsing.
getCompiler ( ) : Compiler
initialize ( ) : void Initializes before template parsing.
nodeClosed ( MacroNode $node ) : void Node is closed.
nodeOpened ( MacroNode $node ) : boolean New node is found.

Protected Methods

Method Description
checkExtraArgs ( MacroNode $node )

Private Methods

Method Description
compile ( MacroNode $node, $def ) : string Generates code.

Method Details

__construct() public method

public __construct ( Compiler $compiler )
$compiler Latte\Compiler

addMacro() public method

public addMacro ( $name, $begin, $end = NULL, $attr = NULL, $flags = NULL )

checkExtraArgs() protected method

protected checkExtraArgs ( MacroNode $node )
$node Latte\MacroNode

finalize() public method

Finishes template parsing.
public finalize ( ) : array(prolog,
return array(prolog,

getCompiler() public method

public getCompiler ( ) : Compiler
return Latte\Compiler

initialize() public method

Initializes before template parsing.
public initialize ( ) : void
return void

nodeClosed() public method

Node is closed.
public nodeClosed ( MacroNode $node ) : void
$node Latte\MacroNode
return void

nodeOpened() public method

New node is found.
public nodeOpened ( MacroNode $node ) : boolean
$node Latte\MacroNode
return boolean