ElementNameResolver
extends NodeVisitorAbstract
in package
FinalYes
Table of Contents
Properties
- $parts : SplDoublyLinkedList<string|int, Identifier|string|null>
Methods
- __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|array<string|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<string|int, Identifier|string|null>
$parts
Methods
__construct()
public
__construct() : 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
Attributes
- #[Override]
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|array<string|int, Node>
Parameters
- $node : Node
-
Node
Attributes
- #[Override]
Return values
null|int|Node|array<string|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
Attributes
- #[Override]
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
stringresetState()
Resets the state of the object to an empty state.
private
resetState([string|null $namespace = null ]) : void
Parameters
- $namespace : string|null = null
setFqsen()
private
setFqsen(Node $node) : void
Parameters
- $node : Node