Documentation

Parser
in package

Tags
author

Fabien Potencier fabien@symfony.com

Table of Contents

Properties

$blocks  : mixed
$blockStack  : mixed
$embeddedTemplates  : mixed
$env  : Environment
$expressionParser  : mixed
$expressionRefs  : WeakMap|null
$ignoreUnknownTwigCallables  : mixed
$importedSymbols  : mixed
$macros  : mixed
$parent  : mixed
$parsers  : ExpressionParsers
$stack  : mixed
$stream  : mixed
$traits  : mixed
$varNameSalt  : mixed
$visitors  : mixed

Methods

__construct()  : mixed
addImportedSymbol()  : void
addTrait()  : void
embedTemplate()  : void
getBlock()  : Node
getBlockStack()  : array<string|int, mixed>
getCurrentToken()  : Token
getEnvironment()  : Environment
getExpressionParser()  : ExpressionParser
getFilter()  : TwigFilter
getFunction()  : TwigFunction
getImportedSymbol()  : AssignTemplateVariable|null}|null
getParent()  : Node|null
getStream()  : TokenStream
getTest()  : TwigTest
getVarName()  : string
hasBlock()  : bool
hasInheritance()  : bool
hasMacro()  : bool
hasTraits()  : bool
isMainScope()  : bool
parse()  : ModuleNode
parseExpression()  : AbstractExpression
peekBlockStack()  : string|null
popBlockStack()  : void
popLocalScope()  : void
pushBlockStack()  : void
pushLocalScope()  : void
setBlock()  : void
setMacro()  : void
setParent()  : void
shouldIgnoreUnknownTwigCallables()  : bool
subparse()  : Node
subparseIgnoreUnknownTwigCallables()  : void
checkPrecedenceDeprecations()  : mixed
filterBodyNodes()  : Node|null

Properties

$blockStack

private mixed $blockStack

$embeddedTemplates

private mixed $embeddedTemplates = []

$expressionParser

private mixed $expressionParser

$expressionRefs

private WeakMap|null $expressionRefs = null

$ignoreUnknownTwigCallables

private mixed $ignoreUnknownTwigCallables = false

$importedSymbols

private mixed $importedSymbols

$parsers

private ExpressionParsers $parsers

$stack

private mixed $stack = []

$varNameSalt

private mixed $varNameSalt = 0

$visitors

private mixed $visitors

Methods

addTrait()

public addTrait(mixed $trait) : void
Parameters
$trait : mixed

getBlock()

public getBlock(string $name) : Node
Parameters
$name : string
Return values
Node

getBlockStack()

public getBlockStack() : array<string|int, mixed>
Return values
array<string|int, mixed>

getFilter()

public getFilter(string $name, int $line) : TwigFilter
Parameters
$name : string
$line : int
Return values
TwigFilter

getImportedSymbol()

public getImportedSymbol(string $type, string $alias) : AssignTemplateVariable|null}|null
Parameters
$type : string
$alias : string
Return values
AssignTemplateVariable|null}|null

getVarName()

public getVarName() : string
Return values
string

hasBlock()

public hasBlock(string $name) : bool
Parameters
$name : string
Return values
bool

hasInheritance()

public hasInheritance() : bool
Return values
bool

hasMacro()

public hasMacro(string $name) : bool
Parameters
$name : string
Return values
bool

hasTraits()

public hasTraits() : bool
Return values
bool

isMainScope()

public isMainScope() : bool
Return values
bool

peekBlockStack()

public peekBlockStack() : string|null
Return values
string|null

popBlockStack()

public popBlockStack() : void

popLocalScope()

public popLocalScope() : void

pushBlockStack()

public pushBlockStack(mixed $name) : void
Parameters
$name : mixed

pushLocalScope()

public pushLocalScope() : void

setParent()

public setParent(Node|null $parent) : void
Parameters
$parent : Node|null

shouldIgnoreUnknownTwigCallables()

public shouldIgnoreUnknownTwigCallables() : bool
Return values
bool

subparse()

public subparse(mixed $test[, bool $dropNeedle = false ]) : Node
Parameters
$test : mixed
$dropNeedle : bool = false
Tags
throws
SyntaxError
Return values
Node

subparseIgnoreUnknownTwigCallables()

public subparseIgnoreUnknownTwigCallables(mixed $test[, bool $dropNeedle = false ]) : void
Parameters
$test : mixed
$dropNeedle : bool = false

filterBodyNodes()

private filterBodyNodes(Node $node[, bool $nested = false ]) : Node|null
Parameters
$node : Node
$nested : bool = false
Return values
Node|null

        
On this page

Search results