AbstractAstBuilder
AbstractYes
Common methods of both AST builders.
Tags
Table of Contents
Properties
- $eventDispatcher : EventDispatcherInterface
- $flatConstants : array<string, string>
Methods
- evaluateValueModifier() : string|null
- Evaluate operator functions, example TypoScript: "page.10.value := appendString(foo)"
- getOrAddNodeFromIdentifierStream() : NodeInterface
- handleIdentifierCopyLine() : NodeInterface|null
- handleIdentifierReferenceLine() : NodeInterface
- "foo =< bar": Prepare a reference resolving.
- handleIdentifierUnsetLine() : void
Properties
$eventDispatcher
protected
EventDispatcherInterface
$eventDispatcher
$flatConstants
protected
array<string, string>
$flatConstants
= []
Methods
evaluateValueModifier()
Evaluate operator functions, example TypoScript: "page.10.value := appendString(foo)"
protected
evaluateValueModifier(Token $functionNameToken, TokenStreamInterface $functionArgumentTokenStream, string|null $originalValue) : string|null
Parameters
- $functionNameToken : Token
- $functionArgumentTokenStream : TokenStreamInterface
- $originalValue : string|null
Return values
string|nullgetOrAddNodeFromIdentifierStream()
protected
getOrAddNodeFromIdentifierStream(CurrentObjectPath $currentObjectPath, IdentifierTokenStream $tokenStream) : NodeInterface
Parameters
- $currentObjectPath : CurrentObjectPath
- $tokenStream : IdentifierTokenStream
Return values
NodeInterfacehandleIdentifierCopyLine()
protected
handleIdentifierCopyLine(IdentifierCopyLine $line, RootNode $rootNode, CurrentObjectPath $currentObjectPath) : NodeInterface|null
Parameters
- $line : IdentifierCopyLine
- $rootNode : RootNode
- $currentObjectPath : CurrentObjectPath
Return values
NodeInterface|nullhandleIdentifierReferenceLine()
"foo =< bar": Prepare a reference resolving.
protected
handleIdentifierReferenceLine(IdentifierReferenceLine $line, CurrentObjectPath $currentObjectPath) : NodeInterface
Note this does not resolve "=<" itself at this point since this operator can only be evaluated after the full AST has been established. Also, having a full AST-traverser run that does this is very expensive and "=<" is only done for "tt_content.myElement" and "lib.parseFunc" anyways. As such, "=<" is NOT a language construct itself and the AST-parser only marks nodes that use it by using the special node "ObjectReference". Resolving then happens "lazy" and "on demand" in ContentObjectRenderer cObjGetSingle() and mergeTSRef() for frontend "setup" TypoScript.
Parameters
- $line : IdentifierReferenceLine
- $currentObjectPath : CurrentObjectPath
Return values
NodeInterfacehandleIdentifierUnsetLine()
protected
handleIdentifierUnsetLine(IdentifierUnsetLine $line, CurrentObjectPath $currentObjectPath) : void
Parameters
- $line : IdentifierUnsetLine
- $currentObjectPath : CurrentObjectPath