class CoreMacros extends MacroSet

Basic macros for Latte.

Methods

static void
install(Compiler $compiler)

No description

void
initialize()

Initializes before template parsing.

array|null
finalize()

Finishes template parsing.

macroIf(MacroNode $node, PhpWriter $writer)

{if .

macroEndIf(MacroNode $node, PhpWriter $writer)

{/if .

macroElse(MacroNode $node, PhpWriter $writer)

{else}

macroIfContent(MacroNode $node, PhpWriter $writer)

n:ifcontent

macroEndIfContent(MacroNode $node, PhpWriter $writer)

n:ifcontent

macroTranslate(MacroNode $node, PhpWriter $writer)

{_$var |modifiers}

macroInclude(MacroNode $node, PhpWriter $writer)

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

macroCapture(MacroNode $node, PhpWriter $writer)

{capture $variable}

macroCaptureEnd(MacroNode $node, PhpWriter $writer)

{/capture}

macroSpaceless(MacroNode $node)

{spaceless} .

macroWhile(MacroNode $node, PhpWriter $writer)

{while .

macroEndWhile(MacroNode $node, PhpWriter $writer)

{/while .

macroEndForeach(MacroNode $node, PhpWriter $writer)

{foreach .

macroBreakContinueIf(MacroNode $node, PhpWriter $writer)

{breakIf .

macroTry(MacroNode $node, PhpWriter $writer)

{try}

macroEndTry(MacroNode $node, PhpWriter $writer)

{/try}

macroCatch(MacroNode $node, PhpWriter $writer)

{catch}

macroClass(MacroNode $node, PhpWriter $writer)

n:class=".

macroAttr(MacroNode $node, PhpWriter $writer)

n:attr=".

macroDump(MacroNode $node, PhpWriter $writer)

{dump .

macroDebugbreak(MacroNode $node, PhpWriter $writer)

{debugbreak .

macroVar(MacroNode $node, PhpWriter $writer)

{var .

macroExpr(MacroNode $node, PhpWriter $writer)

{= .

macroContentType(MacroNode $node, PhpWriter $writer)

{contentType .

macroVarType(MacroNode $node)

{varType type $var}

macroVarPrint(MacroNode $node)

{varPrint [all]}

macroTemplateType(MacroNode $node)

{templateType ClassName}

macroTemplatePrint(MacroNode $node)

{templatePrint [ClassName]}

Details

at line 33
static void install(Compiler $compiler)

Parameters

Compiler $compiler

Return Value

void

at line 91
void initialize()

Initializes before template parsing.

Return Value

void

at line 101
array|null finalize()

Finishes template parsing.

Return Value

array|null [prolog, epilog]

at line 124
macroIf(MacroNode $node, PhpWriter $writer)

{if .

..}

Parameters

MacroNode $node
PhpWriter $writer

at line 142
macroEndIf(MacroNode $node, PhpWriter $writer)

{/if .

..}

Parameters

MacroNode $node
PhpWriter $writer

at line 161
macroElse(MacroNode $node, PhpWriter $writer)

{else}

Parameters

MacroNode $node
PhpWriter $writer

at line 184
macroIfContent(MacroNode $node, PhpWriter $writer)

n:ifcontent

Parameters

MacroNode $node
PhpWriter $writer

at line 195
macroEndIfContent(MacroNode $node, PhpWriter $writer)

n:ifcontent

Parameters

MacroNode $node
PhpWriter $writer

at line 206
macroTranslate(MacroNode $node, PhpWriter $writer)

{_$var |modifiers}

Parameters

MacroNode $node
PhpWriter $writer

at line 229
macroInclude(MacroNode $node, PhpWriter $writer)

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

Parameters

MacroNode $node
PhpWriter $writer

at line 256
macroCapture(MacroNode $node, PhpWriter $writer)

{capture $variable}

Parameters

MacroNode $node
PhpWriter $writer

at line 273
macroCaptureEnd(MacroNode $node, PhpWriter $writer)

{/capture}

Parameters

MacroNode $node
PhpWriter $writer

at line 285
macroSpaceless(MacroNode $node)

{spaceless} .

.. {/spaceless}

Parameters

MacroNode $node

at line 300
macroWhile(MacroNode $node, PhpWriter $writer)

{while .

..}

Parameters

MacroNode $node
PhpWriter $writer

at line 315
macroEndWhile(MacroNode $node, PhpWriter $writer)

{/while .

..}

Parameters

MacroNode $node
PhpWriter $writer

at line 330
macroEndForeach(MacroNode $node, PhpWriter $writer)

{foreach .

..}

Parameters

MacroNode $node
PhpWriter $writer

at line 360
macroBreakContinueIf(MacroNode $node, PhpWriter $writer)

{breakIf .

..} {continueIf ...}

Parameters

MacroNode $node
PhpWriter $writer

at line 376
macroTry(MacroNode $node, PhpWriter $writer)

{try}

Parameters

MacroNode $node
PhpWriter $writer

at line 388
macroEndTry(MacroNode $node, PhpWriter $writer)

{/try}

Parameters

MacroNode $node
PhpWriter $writer

at line 402
macroCatch(MacroNode $node, PhpWriter $writer)

{catch}

Parameters

MacroNode $node
PhpWriter $writer

at line 420
macroClass(MacroNode $node, PhpWriter $writer)

n:class=".

.."

Parameters

MacroNode $node
PhpWriter $writer

at line 432
macroAttr(MacroNode $node, PhpWriter $writer)

n:attr=".

.."

Parameters

MacroNode $node
PhpWriter $writer

at line 441
macroDump(MacroNode $node, PhpWriter $writer)

{dump .

..}

Parameters

MacroNode $node
PhpWriter $writer

at line 457
macroDebugbreak(MacroNode $node, PhpWriter $writer)

{debugbreak .

..}

Parameters

MacroNode $node
PhpWriter $writer

at line 472
macroVar(MacroNode $node, PhpWriter $writer)

{var .

..} {default ...}

Parameters

MacroNode $node
PhpWriter $writer

at line 540
macroExpr(MacroNode $node, PhpWriter $writer)

{= .

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

Parameters

MacroNode $node
PhpWriter $writer

at line 555
macroContentType(MacroNode $node, PhpWriter $writer)

{contentType .

..}

Parameters

MacroNode $node
PhpWriter $writer

at line 592
macroVarType(MacroNode $node)

{varType type $var}

Parameters

MacroNode $node

at line 609
macroVarPrint(MacroNode $node)

{varPrint [all]}

Parameters

MacroNode $node

at line 621
macroTemplateType(MacroNode $node)

{templateType ClassName}

Parameters

MacroNode $node

at line 636
macroTemplatePrint(MacroNode $node)

{templatePrint [ClassName]}

Parameters

MacroNode $node