final class TemplateParser

Properties

Block[][] $blocks
$blockLayer
$inHead
$strict
$lastIndentation

Methods

__construct()

No description

parse(string $template)

Parses tokens to nodes.

parseFragment(callable $resolver, callable|null $after = null)

No description

Node|null
inTextResolve()

No description

parseText()

No description

parseLatteComment()

No description

Node|null
parseLatteStatement(callable|null $resolver = null)

No description

addTags(array $parsers)

No description

void
ensureIsConsumed(Tag $tag)

No description

void
checkBlockIsUnique(Block $block)

No description

setPolicy(Policy|null $policy)

No description

setContentType(string $type)

No description

string
getContentType()

No description

getStream()

No description

getLexer()

No description

Tag|null
peekTag()

No description

Tag
pushTag(Tag $tag)

No description

void
popTag()

No description

int
generateId()

No description

bool
isTagAllowed(string $name)

No description

Details

at line 48
__construct()

No description

at line 59
TemplateNode parse(string $template)

Parses tokens to nodes.

Parameters

string $template

Return Value

TemplateNode

Exceptions

CompileException

at line 85
FragmentNode parseFragment(callable $resolver, callable|null $after = null)

No description

Parameters

callable $resolver
callable|null $after

Return Value

FragmentNode

at line 107
Node|null inTextResolve()

No description

Return Value

Node|null

at line 121
TextNode parseText()

No description

Return Value

TextNode

at line 150
NopNode parseLatteComment()

No description

Return Value

NopNode

at line 164
Node|null parseLatteStatement(callable|null $resolver = null)

No description

Parameters

callable|null $resolver

Return Value

Node|null

at line 294
TemplateParser addTags(array $parsers)

No description

Parameters

array $parsers

Return Value

TemplateParser

at line 363
void ensureIsConsumed(Tag $tag)

No description

Parameters

Tag $tag

Return Value

void

at line 372
void checkBlockIsUnique(Block $block)

No description

Parameters

Block $block

Return Value

void

at line 389
TemplateParser setPolicy(Policy|null $policy)

No description

Parameters

Policy|null $policy

Return Value

TemplateParser

at line 396
TemplateParser setContentType(string $type)

No description

Parameters

string $type

Return Value

TemplateParser

at line 406
string getContentType()

No description

Return Value

string

at line 413
TokenStream getStream()

internal  
 

No description

Return Value

TokenStream

at line 419
TemplateLexer getLexer()

No description

Return Value

TemplateLexer

at line 425
Tag|null peekTag()

No description

Return Value

Tag|null

at line 431
Tag pushTag(Tag $tag)

No description

Parameters

Tag $tag

Return Value

Tag

at line 439
void popTag()

No description

Return Value

void

at line 445
int generateId()

No description

Return Value

int

at line 451
bool isTagAllowed(string $name)

No description

Parameters

string $name

Return Value

bool