PHP Class Latte\Macros\CoreMacros

- {if ?} ... {elseif ?} ... {else} ... {/if} - {ifset ?} ... {elseifset ?} ... {/ifset} - {for ?} ... {/for} - {foreach ?} ... {/foreach} - {$variable} with escaping - {=expression} echo with escaping - {php expression} evaluate PHP statement - {_expression} echo translation with escaping - {attr ?} HTML element attributes - {capture ?} ... {/capture} capture block to parameter - {spaceless} ... {/spaceless} compress whitespaces - {var var => value} set template parameter - {default var => value} set default template parameter - {dump $var} - {debugbreak} - {contentType ...} HTTP Content-Type header - {status ...} HTTP status - {l} {r} to display { }
Inheritance: extends MacroSet
Show file Open project: nette/latte

Public Methods

Method Description
finalize ( ) : array(prolog, Finishes template parsing.
initialize ( ) : void Initializes before template parsing.
install ( Compiler $compiler )
macroAttr ( MacroNode $node, PhpWriter $writer ) n:attr=".
macroBreakContinueIf ( MacroNode $node, PhpWriter $writer ) {breakIf .
macroCapture ( MacroNode $node, PhpWriter $writer ) {capture $variable}
macroCaptureEnd ( MacroNode $node, PhpWriter $writer ) {/capture}
macroClass ( MacroNode $node, PhpWriter $writer ) n:class=".
macroContentType ( MacroNode $node, PhpWriter $writer ) {contentType .
macroDebugbreak ( MacroNode $node, PhpWriter $writer ) {debugbreak .
macroDump ( MacroNode $node, PhpWriter $writer ) {dump .
macroElse ( MacroNode $node, PhpWriter $writer ) {else}
macroEndForeach ( MacroNode $node, PhpWriter $writer ) {foreach .
macroEndIf ( MacroNode $node, PhpWriter $writer ) {/if .
macroEndIfContent ( MacroNode $node, PhpWriter $writer ) n:ifcontent
macroEndWhile ( MacroNode $node, PhpWriter $writer ) {/while .
macroExpr ( MacroNode $node, PhpWriter $writer ) {= .
macroIf ( MacroNode $node, PhpWriter $writer ) {if .
macroIfContent ( MacroNode $node, PhpWriter $writer ) n:ifcontent
macroInclude ( MacroNode $node, PhpWriter $writer ) {include "file" [,] [params]}
macroSpaceless ( MacroNode $node, PhpWriter $writer ) {spaceless} .
macroStatus ( MacroNode $node, PhpWriter $writer ) {status .
macroTranslate ( MacroNode $node, PhpWriter $writer ) {_$var |modifiers}
macroUse ( MacroNode $node, PhpWriter $writer ) {use class MacroSet}
macroVar ( MacroNode $node, PhpWriter $writer ) {var .
macroWhile ( MacroNode $node, PhpWriter $writer ) {while .

Method Details

finalize() public method

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

initialize() public method

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

install() public static method

public static install ( Compiler $compiler )
$compiler Latte\Compiler

macroAttr() public method

.."
public macroAttr ( MacroNode $node, PhpWriter $writer )
$node Latte\MacroNode
$writer Latte\PhpWriter

macroBreakContinueIf() public method

..} {continueIf ...}
public macroBreakContinueIf ( MacroNode $node, PhpWriter $writer )
$node Latte\MacroNode
$writer Latte\PhpWriter

macroCapture() public method

{capture $variable}
public macroCapture ( MacroNode $node, PhpWriter $writer )
$node Latte\MacroNode
$writer Latte\PhpWriter

macroCaptureEnd() public method

{/capture}
public macroCaptureEnd ( MacroNode $node, PhpWriter $writer )
$node Latte\MacroNode
$writer Latte\PhpWriter

macroClass() public method

.."
public macroClass ( MacroNode $node, PhpWriter $writer )
$node Latte\MacroNode
$writer Latte\PhpWriter

macroContentType() public method

..}
public macroContentType ( MacroNode $node, PhpWriter $writer )
$node Latte\MacroNode
$writer Latte\PhpWriter

macroDebugbreak() public method

..}
public macroDebugbreak ( MacroNode $node, PhpWriter $writer )
$node Latte\MacroNode
$writer Latte\PhpWriter

macroDump() public method

..}
public macroDump ( MacroNode $node, PhpWriter $writer )
$node Latte\MacroNode
$writer Latte\PhpWriter

macroElse() public method

{else}
public macroElse ( MacroNode $node, PhpWriter $writer )
$node Latte\MacroNode
$writer Latte\PhpWriter

macroEndForeach() public method

..}
public macroEndForeach ( MacroNode $node, PhpWriter $writer )
$node Latte\MacroNode
$writer Latte\PhpWriter

macroEndIf() public method

..}
public macroEndIf ( MacroNode $node, PhpWriter $writer )
$node Latte\MacroNode
$writer Latte\PhpWriter

macroEndIfContent() public method

n:ifcontent
public macroEndIfContent ( MacroNode $node, PhpWriter $writer )
$node Latte\MacroNode
$writer Latte\PhpWriter

macroEndWhile() public method

..}
public macroEndWhile ( MacroNode $node, PhpWriter $writer )
$node Latte\MacroNode
$writer Latte\PhpWriter

macroExpr() public method

..} {php ...}
public macroExpr ( MacroNode $node, PhpWriter $writer )
$node Latte\MacroNode
$writer Latte\PhpWriter

macroIf() public method

..}
public macroIf ( MacroNode $node, PhpWriter $writer )
$node Latte\MacroNode
$writer Latte\PhpWriter

macroIfContent() public method

n:ifcontent
public macroIfContent ( MacroNode $node, PhpWriter $writer )
$node Latte\MacroNode
$writer Latte\PhpWriter

macroInclude() public method

{include "file" [,] [params]}
public macroInclude ( MacroNode $node, PhpWriter $writer )
$node Latte\MacroNode
$writer Latte\PhpWriter

macroSpaceless() public method

.. {/spaceless}
public macroSpaceless ( MacroNode $node, PhpWriter $writer )
$node Latte\MacroNode
$writer Latte\PhpWriter

macroStatus() public method

..}
public macroStatus ( MacroNode $node, PhpWriter $writer )
$node Latte\MacroNode
$writer Latte\PhpWriter

macroTranslate() public method

{_$var |modifiers}
public macroTranslate ( MacroNode $node, PhpWriter $writer )
$node Latte\MacroNode
$writer Latte\PhpWriter

macroUse() public method

{use class MacroSet}
public macroUse ( MacroNode $node, PhpWriter $writer )
$node Latte\MacroNode
$writer Latte\PhpWriter

macroVar() public method

..} {default ...}
public macroVar ( MacroNode $node, PhpWriter $writer )
$node Latte\MacroNode
$writer Latte\PhpWriter

macroWhile() public method

..}
public macroWhile ( MacroNode $node, PhpWriter $writer )
$node Latte\MacroNode
$writer Latte\PhpWriter