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}

void
macroIfContent(MacroNode $node, PhpWriter $writer)

n:ifcontent

void
macroEndIfContent(MacroNode $node, PhpWriter $writer)

n:ifcontent

string
macroTranslate(MacroNode $node, PhpWriter $writer)

{_$var |modifiers}

string
macroInclude(MacroNode $node, PhpWriter $writer)

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

string
macroCapture(MacroNode $node, PhpWriter $writer)

{capture $variable}

string
macroCaptureEnd(MacroNode $node, PhpWriter $writer)

{/capture}

void
macroSpaceless(MacroNode $node)

{spaceless} ... {/spaceless}

string
macroWhile(MacroNode $node, PhpWriter $writer)

{while ...}

string
macroEndWhile(MacroNode $node, PhpWriter $writer)

{/while ...}

void
macroEndForeach(MacroNode $node, PhpWriter $writer)

{foreach ...}

string
macroBreakContinueIf(MacroNode $node, PhpWriter $writer)

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

string
macroClass(MacroNode $node, PhpWriter $writer)

n:class="..."

string
macroAttr(MacroNode $node, PhpWriter $writer)

n:attr="..."

string
macroDump(MacroNode $node, PhpWriter $writer)

{dump ...}

string
macroDebugbreak(MacroNode $node, PhpWriter $writer)

{debugbreak ...}

string
macroVar(MacroNode $node, PhpWriter $writer)

{var ...} {default ...}

string
macroExpr(MacroNode $node, PhpWriter $writer)

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

string
macroContentType(MacroNode $node, PhpWriter $writer)

{contentType ...}

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 33
static void install(Compiler $compiler)

No description

Parameters

Compiler $compiler

Return Value

void

at line 88
void initialize()

Initializes before template parsing.

Return Value

void

at line 97
finalize()

Finishes template parsing.

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

{if ...}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

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

{/if ...}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

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

{else}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

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

n:ifcontent

Parameters

MacroNode $node
PhpWriter $writer

Return Value

void

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

n:ifcontent

Parameters

MacroNode $node
PhpWriter $writer

Return Value

void

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

{_$var |modifiers}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

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

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

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

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

{capture $variable}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

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

{/capture}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

at line 300
void macroSpaceless(MacroNode $node)

{spaceless} ... {/spaceless}

Parameters

MacroNode $node

Return Value

void

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

{while ...}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

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

{/while ...}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

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

{foreach ...}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

void

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

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

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

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

n:class="..."

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

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

n:attr="..."

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

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

{dump ...}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

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

{debugbreak ...}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

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

{var ...} {default ...}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

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

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

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

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

{contentType ...}

Parameters

MacroNode $node
PhpWriter $writer

Return Value

string

at line 582
void macroVarType(MacroNode $node)

{varType type $var}

Parameters

MacroNode $node

Return Value

void

at line 599
string macroVarPrint(MacroNode $node)

{varPrint [all]}

Parameters

MacroNode $node

Return Value

string

at line 611
void macroTemplateType(MacroNode $node)

{templateType ClassName}

Parameters

MacroNode $node

Return Value

void

at line 626
void macroTemplatePrint(MacroNode $node)

{templatePrint [ClassName]}

Parameters

MacroNode $node

Return Value

void