class CoreMacros extends MacroSet

Basic macros for Latte.

Methods

static void
install(Compiler $compiler)

No description

void
initialize()

Initializes before template parsing.

finalize()

Finishes template parsing.

string
macroIf(MacroNode $node, PhpWriter $writer)

{if ...}

string
macroEndIf(MacroNode $node, PhpWriter $writer)

{/if ...}

string
macroElse(MacroNode $node, PhpWriter $writer)

{else}

string
macroElseIf(MacroNode $node, PhpWriter $writer)

{elseif} {elseifset}

void
macroIfContent(MacroNode $node, PhpWriter $writer)

n:ifcontent

void
macroEndIfContent(MacroNode $node, PhpWriter $writer)

n:ifcontent

void
macroIfChanged(MacroNode $node, PhpWriter $writer)

{ifchanged [...]}

void
macroTry(MacroNode $node, PhpWriter $writer)

{try}

string
macroRollback(MacroNode $node, PhpWriter $writer)

{rollback}

string
macroTranslate(MacroNode $node, PhpWriter $writer)

{_$var |modifiers} {translate|modifiers}

string
macroInclude(MacroNode $node, PhpWriter $writer)

{include [file] "file" [with blocks] [,] [params]}

string
macroSandbox(MacroNode $node, PhpWriter $writer)

{sandbox "file" [,] [params]}

string
macroCapture(MacroNode $node, PhpWriter $writer)

{capture $variable}

string
macroCaptureEnd(MacroNode $node, PhpWriter $writer)

{/capture}

void
macroSpaceless(MacroNode $node, PhpWriter $writer)

{spaceless} ... {/spaceless}

string
macroWhile(MacroNode $node, PhpWriter $writer)

{while ...}

string
macroEndWhile(MacroNode $node, PhpWriter $writer)

{/while ...}

void
macroEndForeach(MacroNode $node, PhpWriter $writer)

{foreach ...}

void
macroIterateWhile(MacroNode $node, PhpWriter $writer)

{iterateWhile ...}

void
macroEndIterateWhile(MacroNode $node, PhpWriter $writer)

{/iterateWhile ...}

string
macroBreakContinueIf(MacroNode $node, PhpWriter $writer)

{breakIf ...} {continueIf ...} {skipIf ...}

string
macroClass(MacroNode $node, PhpWriter $writer)

n:class="..."

string
macroAttr(MacroNode $node, PhpWriter $writer)

n:attr="..."

void
macroTag(MacroNode $node, PhpWriter $writer)

n:tag="..."

void
macroTagEnd(MacroNode $node, PhpWriter $writer)

n:tag="..."

string
macroDump(MacroNode $node, PhpWriter $writer)

{dump ...}

string
macroDebugbreak(MacroNode $node, PhpWriter $writer)

{debugbreak ...}

string
macroCase(MacroNode $node, PhpWriter $writer)

{case ...}

string
macroVar(MacroNode $node, PhpWriter $writer)

{var ...} {default ...} {default} in {switch}

string
macroExpr(MacroNode $node, PhpWriter $writer)

{= ...} {php ...} {do ...}

string
macroContentType(MacroNode $node, PhpWriter $writer)

{contentType ...}

void
macroParameters(MacroNode $node, PhpWriter $writer)

{parameters type $var, ...}

void
macroVarType(MacroNode $node)

{varType type $var}

string
macroVarPrint(MacroNode $node)

{varPrint [all]}

void
macroTemplateType(MacroNode $node)

{templateType ClassName}

void
macroTemplatePrint(MacroNode $node)

{templatePrint [ClassName]}

Details

at line 36
static void install(Compiler $compiler)

No description

Parameters

Compiler $compiler

Return Value

void

at line 101
void initialize()

Initializes before template parsing.

Return Value

void

at line 111
finalize()

Finishes template parsing.

at line 137
string macroIf(MacroNode $node, PhpWriter $writer)

{if ...}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

at line 162
string macroEndIf(MacroNode $node, PhpWriter $writer)

{/if ...}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

at line 194
string macroElse(MacroNode $node, PhpWriter $writer)

{else}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

at line 233
string macroElseIf(MacroNode $node, PhpWriter $writer)

{elseif} {elseifset}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

at line 249
void macroIfContent(MacroNode $node, PhpWriter $writer)

n:ifcontent

Parameters

MacroNode $node
PhpWriter $writer

Return Value

void

at line 265
void macroEndIfContent(MacroNode $node, PhpWriter $writer)

n:ifcontent

Parameters

MacroNode $node
PhpWriter $writer

Return Value

void

at line 279
void macroIfChanged(MacroNode $node, PhpWriter $writer)

{ifchanged [...]}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

void

at line 300
void macroTry(MacroNode $node, PhpWriter $writer)

{try}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

void

at line 326
string macroRollback(MacroNode $node, PhpWriter $writer)

{rollback}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

at line 343
string macroTranslate(MacroNode $node, PhpWriter $writer)

{_$var |modifiers} {translate|modifiers}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

at line 381
string macroInclude(MacroNode $node, PhpWriter $writer)

{include [file] "file" [with blocks] [,] [params]}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

at line 411
string macroSandbox(MacroNode $node, PhpWriter $writer)

{sandbox "file" [,] [params]}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

at line 430
string macroCapture(MacroNode $node, PhpWriter $writer)

{capture $variable}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

at line 448
string macroCaptureEnd(MacroNode $node, PhpWriter $writer)

{/capture}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

at line 468
void macroSpaceless(MacroNode $node, PhpWriter $writer)

{spaceless} ... {/spaceless}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

void

at line 481
string macroWhile(MacroNode $node, PhpWriter $writer)

{while ...}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

at line 495
string macroEndWhile(MacroNode $node, PhpWriter $writer)

{/while ...}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

at line 509
void macroEndForeach(MacroNode $node, PhpWriter $writer)

{foreach ...}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

void

at line 544
void macroIterateWhile(MacroNode $node, PhpWriter $writer)

{iterateWhile ...}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

void

at line 557
void macroEndIterateWhile(MacroNode $node, PhpWriter $writer)

{/iterateWhile ...}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

void

at line 584
string macroBreakContinueIf(MacroNode $node, PhpWriter $writer)

{breakIf ...} {continueIf ...} {skipIf ...}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

at line 611
string macroClass(MacroNode $node, PhpWriter $writer)

n:class="..."

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

at line 625
string macroAttr(MacroNode $node, PhpWriter $writer)

n:attr="..."

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

at line 635
void macroTag(MacroNode $node, PhpWriter $writer)

n:tag="..."

Parameters

MacroNode $node
PhpWriter $writer

Return Value

void

at line 651
void macroTagEnd(MacroNode $node, PhpWriter $writer)

n:tag="..."

Parameters

MacroNode $node
PhpWriter $writer

Return Value

void

at line 677
string macroDump(MacroNode $node, PhpWriter $writer)

{dump ...}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

at line 691
string macroDebugbreak(MacroNode $node, PhpWriter $writer)

{debugbreak ...}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

at line 705
string macroCase(MacroNode $node, PhpWriter $writer)

{case ...}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

at line 721
string macroVar(MacroNode $node, PhpWriter $writer)

{var ...} {default ...} {default} in {switch}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

at line 817
string macroExpr(MacroNode $node, PhpWriter $writer)

{= ...} {php ...} {do ...}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

at line 843
string macroContentType(MacroNode $node, PhpWriter $writer)

{contentType ...}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

at line 886
void macroParameters(MacroNode $node, PhpWriter $writer)

{parameters type $var, ...}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

void

at line 930
void macroVarType(MacroNode $node)

{varType type $var}

Parameters

MacroNode $node

Return Value

void

at line 950
string macroVarPrint(MacroNode $node)

{varPrint [all]}

Parameters

MacroNode $node

Return Value

string

at line 962
void macroTemplateType(MacroNode $node)

{templateType ClassName}

Parameters

MacroNode $node

Return Value

void

at line 975
void macroTemplatePrint(MacroNode $node)

{templatePrint [ClassName]}

Parameters

MacroNode $node

Return Value

void