final class TemplateLexer

Constants

ReTagName

HTML tag name for Latte needs (actually is [a-zA-Z][^\s/>]*)

NPrefix

special HTML attribute prefix

private ReHtmlName

HTML attribute name/value (\p{C} means \x00-\x1F except space)

private ReHtmlValue

private StateEnd

Properties

$syntaxes

Methods

tokenize(string $template, string $contentType = ContentType::Html)

No description

setContentType(string $type)

No description

setSyntax(string|null $type)

Changes macro tag delimiters.

setDelimiters(string $left, string $right)

Changes macro tag delimiters (as regular expression).

Details

at line 52
Generator tokenize(string $template, string $contentType = ContentType::Html)

No description

Parameters

string $template
string $contentType

Return Value

Generator

at line 329
TemplateLexer setContentType(string $type)

No description

Parameters

string $type

Return Value

TemplateLexer

at line 364
TemplateLexer setSyntax(string|null $type)

Changes macro tag delimiters.

Parameters

string|null $type

Return Value

TemplateLexer

at line 379
TemplateLexer setDelimiters(string $left, string $right)

Changes macro tag delimiters (as regular expression).

Parameters

string $left
string $right

Return Value

TemplateLexer

Traits

Better OOP experience.