PHP Class Latte\Parser

Inheritance: use trait latte\Strict
Datei anzeigen Open project: nette/latte Class Usage Examples

Public Properties

Property Type Description
$defaultSyntax default macro tag syntax
$shortNoEscape
$syntaxes array

Public Methods

Method Description
getLine ( )
parse ( $input ) : latte\Token[] Process all {macros} and .
parseMacroTag ( $tag ) : array Parses macro tag to name, arguments a modifiers parts.
setContentType ( $type ) : static
setContext ( $context, $quote = NULL ) : static
setDelimiters ( $left, $right ) : static Changes macro tag delimiters.
setSyntax ( $type ) : static Changes macro tag delimiters.

Protected Methods

Method Description
filter ( latte\Token $token ) Process low-level macros.

Private Methods

Method Description
addToken ( $type, $text )
contextHtmlAttribute ( ) Handles CONTEXT_HTML_ATTRIBUTE.
contextHtmlCData ( ) Handles CONTEXT_HTML_CDATA.
contextHtmlComment ( ) Handles CONTEXT_HTML_COMMENT.
contextHtmlTag ( ) Handles CONTEXT_HTML_TAG.
contextHtmlText ( ) Handles CONTEXT_HTML_TEXT.
contextMacro ( ) Handles CONTEXT_MACRO.
contextNone ( ) Handles CONTEXT_NONE.
match ( $re ) : array Matches next token.
processMacro ( $matches )

Method Details

filter() protected method

Process low-level macros.
protected filter ( latte\Token $token )
$token latte\Token

getLine() public method

public getLine ( )

parse() public method

Process all {macros} and .
public parse ( $input ) : latte\Token[]
return latte\Token[]

parseMacroTag() public method

Parses macro tag to name, arguments a modifiers parts.
public parseMacroTag ( $tag ) : array
return array

setContentType() public method

public setContentType ( $type ) : static
return static

setContext() public method

public setContext ( $context, $quote = NULL ) : static
return static

setDelimiters() public method

Changes macro tag delimiters.
public setDelimiters ( $left, $right ) : static
return static

setSyntax() public method

Changes macro tag delimiters.
public setSyntax ( $type ) : static
return static

Property Details

$defaultSyntax public_oe property

default macro tag syntax
public $defaultSyntax

$shortNoEscape public_oe property

Deprecation:
public $shortNoEscape

$syntaxes public_oe property

public array $syntaxes
return array