Twig_Parser

Extends\Twig\Parser

Default parser implementation.

package

Default

Methods

__construct

__construct(\Twig\Environment $env)
inherited

Arguments

$env

\Twig\Environment

addHandler

addHandler( $name, $class)
inherited
deprecated

since 1.27 (to be removed in 2.0)

Arguments

$name

$class

addImportedSymbol

addImportedSymbol( $type, $alias, $name = null,\Twig\Node\Expression\AbstractExpression $node = null)
inherited

Arguments

$type

$alias

$name

addNodeVisitor

addNodeVisitor(\Twig\NodeVisitor\NodeVisitorInterface $visitor)
inherited
deprecated

since 1.27 (to be removed in 2.0)

Arguments

addTrait

addTrait( $trait)
inherited

Arguments

$trait

embedTemplate

embedTemplate(\Twig\Node\ModuleNode $template)
inherited

Arguments

$template

\Twig\Node\ModuleNode

filterBodyNodes

filterBodyNodes(\Twig_NodeInterface $node)
inherited

Arguments

getBlock

getBlock( $name)
inherited

Arguments

$name

getBlockStack

getBlockStack()
inherited

getCurrentToken

getCurrentToken(): \Twig\Token
inherited

Response

\Twig\Token

getEnvironment

getEnvironment()
inherited
deprecated

since 1.27 (to be removed in 2.0)

getExpressionParser

getExpressionParser(): \Twig\ExpressionParser
inherited

Response

\Twig\ExpressionParser

getFilename

getFilename()
inherited
deprecated

since 1.27 (to be removed in 2.0). Use $parser->getStream()->getSourceContext()->getPath() instead.

getImportedSymbol

getImportedSymbol( $type, $alias)
inherited

Arguments

$type

$alias

getParent

getParent()
inherited

getStream

getStream(): \Twig\TokenStream
inherited

getVarName

getVarName()
inherited

hasBlock

hasBlock( $name)
inherited

Arguments

$name

hasMacro

hasMacro( $name)
inherited

Arguments

$name

hasTraits

hasTraits()
inherited

isMainScope

isMainScope()
inherited

isReservedMacroName

isReservedMacroName( $name)
inherited

Arguments

$name

Converts a token stream to a node tree.

parse(\Twig\TokenStream $stream, $test = null, $dropNeedle = false): \Twig\Node\ModuleNode
inherited

Arguments

$test

$dropNeedle

Response

\Twig\Node\ModuleNode

peekBlockStack

peekBlockStack()
inherited

popBlockStack

popBlockStack()
inherited

popLocalScope

popLocalScope()
inherited

pushBlockStack

pushBlockStack( $name)
inherited

Arguments

$name

pushLocalScope

pushLocalScope()
inherited

setBlock

setBlock( $name,\Twig\Node\BlockNode $value)
inherited

Arguments

$name

setMacro

setMacro( $name,\Twig\Node\MacroNode $node)
inherited

Arguments

$name

$node

\Twig\Node\MacroNode

setParent

setParent( $parent)
inherited

Arguments

$parent

subparse

subparse( $test, $dropNeedle = false)
inherited

Arguments

$test

$dropNeedle

Properties

stack

stack :
inherited

Type(s)

stream

stream :
inherited

Type(s)

parent

parent :
inherited

Type(s)

handlers

handlers :
inherited

Type(s)

visitors

visitors :
inherited

Type(s)

expressionParser

expressionParser :
inherited

Type(s)

blocks

blocks :
inherited

Type(s)

blockStack

blockStack :
inherited

Type(s)

macros

macros :
inherited

Type(s)

env

env :
inherited

Type(s)

reservedMacroNames

reservedMacroNames :
inherited

Type(s)

importedSymbols

importedSymbols :
inherited

Type(s)

traits

traits :
inherited

Type(s)

embeddedTemplates

embeddedTemplates :
inherited

Type(s)

varNameSalt

varNameSalt :
inherited

Type(s)