final class TemplateLexer

Constants

ReTagName

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

NPrefix

special HTML attribute prefix

private ReAttrName

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

private StateEnd

Properties

$openDelimiter
$closeDelimiter

Methods

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

No description

setContentType(string $type)

No description

setSyntax(string|null $type, string|null $endTag = null)

Changes tag delimiters.

Details

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

No description

Parameters

string $template
string $contentType

Return Value

Generator

at line 322
TemplateLexer setContentType(string $type)

No description

Parameters

string $type

Return Value

TemplateLexer

at line 357
TemplateLexer setSyntax(string|null $type, string|null $endTag = null)

Changes tag delimiters.

Parameters

string|null $type
string|null $endTag

Return Value

TemplateLexer

Traits

Better OOP experience.