Documentation

SimpleTokenParser extends Twig_Extensions_SimpleTokenParser
in package

Base class for all token parsers.

Table of Contents

$grammar  : mixed
$parser  : Parser
$tag  : mixed
__construct()  : mixed
getGrammar()  : string|Twig_Extensions_Grammar
Gets the grammar as an object or as a string.
getNode()  : mixed
Gets the nodes based on the parsed values.
getTag()  : mixed
parse()  : Twig_Node
Parses a token and returns a node.
parseGrammar()  : mixed
setParser()  : mixed
Sets the parser associated with this token parser.
call()  : mixed
getAttribute()  : mixed
getNodeValues()  : mixed
markAsSafe()  : mixed
output()  : mixed

Properties

Methods

__construct()

public __construct(mixed $tag, mixed $grammar) : mixed
Parameters
$tag : mixed
$grammar : mixed
Return values
mixed

getNode()

Gets the nodes based on the parsed values.

public getNode(array<string|int, mixed> $values, mixed $line) : mixed
Parameters
$values : array<string|int, mixed>

An array of values

$line : mixed

The parser line

Return values
mixed

parseGrammar()

public static parseGrammar(mixed $str[, mixed $main = true ]) : mixed
Parameters
$str : mixed
$main : mixed = true
Return values
mixed

setParser()

Sets the parser associated with this token parser.

public setParser(Parser $parser) : mixed
Parameters
$parser : Parser
Return values
mixed

call()

protected call(mixed $node, mixed $attribute[, mixed $arguments = array() ][, mixed $line = -1 ]) : mixed
Parameters
$node : mixed
$attribute : mixed
$arguments : mixed = array()
$line : mixed = -1
Return values
mixed

getAttribute()

protected getAttribute(mixed $node, mixed $attribute[, mixed $arguments = array() ][, mixed $type = Twig_Node_Expression_GetAttr::TYPE_ANY ][, mixed $line = -1 ]) : mixed
Parameters
$node : mixed
$attribute : mixed
$arguments : mixed = array()
$type : mixed = Twig_Node_Expression_GetAttr::TYPE_ANY
$line : mixed = -1
Return values
mixed

getNodeValues()

protected getNodeValues(array<string|int, mixed> $values) : mixed
Parameters
$values : array<string|int, mixed>
Return values
mixed

Search results