ElementNameResolver
extends NodeVisitorAbstract
in package
Table of Contents
- $parts : SplDoublyLinkedList
- __construct() : mixed
- afterTraverse() : null|array<string|int, Node>
- Called once after traversal.
- beforeTraverse() : null|array<string|int, Node>
- Resets the object to a known state before start processing.
- enterNode() : null|int|Node
- Adds fqsen property to a node when applicable.
- leaveNode() : null|int|Node|array<string|int, Node>
- Performs a reset of the added element when needed.
- buildName() : string
- Builds the name of the current node using the parts that are pushed to the parts list.
- resetState() : void
- Resets the state of the object to an empty state.
- setFqsen() : void
Properties
$parts
private
SplDoublyLinkedList
$parts
Methods
__construct()
public
__construct() : mixed
Return values
mixed —afterTraverse()
Called once after traversal.
public
afterTraverse(array<string|int, mixed> $nodes) : null|array<string|int, Node>
Return value semantics:
- null: $nodes stays as-is
- otherwise: $nodes is set to the return value
Parameters
- $nodes : array<string|int, mixed>
-
Array of nodes
Return values
null|array<string|int, Node> —Array of nodes
beforeTraverse()
Resets the object to a known state before start processing.
public
beforeTraverse(array<string|int, mixed> $nodes) : null|array<string|int, Node>
Parameters
- $nodes : array<string|int, mixed>
-
Array of nodes
Tags
Return values
null|array<string|int, Node> —Array of nodes
enterNode()
Adds fqsen property to a node when applicable.
public
enterNode(Node $node) : null|int|Node
Parameters
- $node : Node
-
Node
Tags
Return values
null|int|Node —Replacement node (or special return value)
leaveNode()
Performs a reset of the added element when needed.
public
leaveNode(Node $node) : null|int|Node|array<string|int, Node>
Parameters
- $node : Node
-
Node
Tags
Return values
null|int|Node|array<string|int, Node> —Replacement node (or special return value)
buildName()
Builds the name of the current node using the parts that are pushed to the parts list.
private
buildName() : string
Return values
string —resetState()
Resets the state of the object to an empty state.
private
resetState([string|null $namespace = null ]) : void
Parameters
- $namespace : string|null = null
Return values
void —setFqsen()
private
setFqsen(Node $node) : void
Parameters
- $node : Node