Class Twig_Parser

InheritanceTwig_Parser
ImplementsTwig_ParserInterface

Default parser implementation.

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
filterBodyNodes() Twig_Parser

Property Details

$blockStack protected property
protected $blockStack null
$blocks protected property
protected $blocks null
$embeddedTemplates protected property
protected $embeddedTemplates = []
$env protected property
protected $env null
$expressionParser protected property
protected $expressionParser null
$handlers protected property
protected $handlers null
$importedSymbols protected property
protected $importedSymbols null
$macros protected property
protected $macros null
$parent protected property
protected $parent null
$reservedMacroNames protected property
protected $reservedMacroNames null
$stack protected property
protected $stack = []
$stream protected property
protected $stream null
$traits protected property
protected $traits null
$visitors protected property
protected $visitors null

Method Details

__construct() public method

Constructor.

public void __construct ( Twig_Environment $env )
$env Twig_Environment

A Twig_Environment instance

addHandler() public method

public void addHandler ( $name, $class )
$name
$class
addImportedSymbol() public method

public void addImportedSymbol ( $type, $alias, $name null, Twig_Node_Expression $node null )
$type
$alias
$name
$node
addNodeVisitor() public method

public void addNodeVisitor ( Twig_NodeVisitorInterface $visitor )
$visitor
addTrait() public method

public void addTrait ( $trait )
$trait
embedTemplate() public method

public void embedTemplate ( Twig_Node_Module $template )
$template
filterBodyNodes() protected method

protected void filterBodyNodes ( Twig_NodeInterface $node )
$node
getBlock() public method

public void getBlock ( $name )
$name
getBlockStack() public method

public void getBlockStack ( )
getCurrentToken() public method

Gets the current token.

public Twig_Token getCurrentToken ( )
return Twig_Token

The current token

getEnvironment() public method

public void getEnvironment ( )
getExpressionParser() public method

Gets the expression parser.

public Twig_ExpressionParser getExpressionParser ( )
return Twig_ExpressionParser

The expression parser

getFilename() public method

public void getFilename ( )
getImportedSymbol() public method

public void getImportedSymbol ( $type, $alias )
$type
$alias
getParent() public method

public void getParent ( )
getStream() public method

Gets the token stream.

public Twig_TokenStream getStream ( )
return Twig_TokenStream

The token stream

getVarName() public method

public void getVarName ( )
hasBlock() public method

public void hasBlock ( $name )
$name
hasMacro() public method

public void hasMacro ( $name )
$name
hasTraits() public method

public void hasTraits ( )
isMainScope() public method

public void isMainScope ( )
isReservedMacroName() public method

public void isReservedMacroName ( $name )
$name
parse() public method

{@inheritdoc}

public void parse ( Twig_TokenStream $stream, $test null, $dropNeedle false )
$stream
$test
$dropNeedle
peekBlockStack() public method

public void peekBlockStack ( )
popBlockStack() public method

public void popBlockStack ( )
popLocalScope() public method

public void popLocalScope ( )
pushBlockStack() public method

public void pushBlockStack ( $name )
$name
pushLocalScope() public method

public void pushLocalScope ( )
setBlock() public method

public void setBlock ( $name, Twig_Node_Block $value )
$name
$value
setMacro() public method

public void setMacro ( $name, Twig_Node_Macro $node )
$name
$node
setParent() public method

public void setParent ( $parent )
$parent
subparse() public method

public void subparse ( $test, $dropNeedle false )
$test
$dropNeedle