class Parser

Latte parser.

Traits

Better OOP experience.

Constants

RE_STRING

N_PREFIX

CONTENT_HTML

Context-aware escaping content types

CONTENT_XHTML

Context-aware escaping content types

CONTENT_XML

Context-aware escaping content types

CONTENT_TEXT

Context-aware escaping content types

CONTEXT_NONE

CONTEXT_MACRO

CONTEXT_HTML_TEXT

CONTEXT_HTML_TAG

CONTEXT_HTML_ATTRIBUTE

CONTEXT_HTML_COMMENT

CONTEXT_HTML_CDATA

Properties

string $defaultSyntax
array $syntaxes

Methods

array
parse(string $input)

Process all {macros} and .

setContentType(string $type)

No description

setContext(string $context, $quote = null)

No description

setSyntax(string $type)

Changes macro tag delimiters.

setDelimiters(string $left, string $right)

Changes macro tag delimiters (as regular expression).

array|null
parseMacroTag(string $tag)

Parses macro tag to name, arguments a modifiers parts.

int
getLine()

No description

void
filter(Token $token)

Process low-level macros.

Details

at line 85
array parse(string $input)

Process all {macros} and .

Parameters

string $input

Return Value

array

at line 332
Parser setContentType(string $type)

Parameters

string $type Parser::CONTENT_HTML, CONTENT_XHTML, CONTENT_XML or CONTENT_TEXT

Return Value

Parser

at line 347
Parser setContext(string $context, $quote = null)

Parameters

string $context
$quote

Return Value

Parser

at line 358
Parser setSyntax(string $type)

Changes macro tag delimiters.

Parameters

string $type

Return Value

Parser

at line 374
Parser setDelimiters(string $left, string $right)

Changes macro tag delimiters (as regular expression).

Parameters

string $left
string $right

Return Value

Parser

at line 386
array|null parseMacroTag(string $tag)

Parses macro tag to name, arguments a modifiers parts.

Parameters

string $tag {name arguments | modifiers}

Return Value

array|null

at line 419
int getLine()

Return Value

int

at line 430
protected void filter(Token $token)

Process low-level macros.

Parameters

Token $token

Return Value

void