‪TYPO3CMS  10.4
NodeVisitor Class Reference
Inheritance diagram for NodeVisitor:

Public Member Functions

 enterNode (Node $node)
 
Node[] null beforeTraverse (array $nodes)
 
int Node null enterNode (Node $node)
 
int Node Node[] null leaveNode (Node $node)
 
Node[] null afterTraverse (array $nodes)
 

Public Attributes

array $matches = array( )
 
string null $namespace
 
string null $className
 
string null $classCommentError
 
array $properties = array( )
 
array $methods = array( )
 
bool $hasErrors = false
 

Private Attributes

DocBlockFactory $docBlockFactory
 

Detailed Description

Class NodeVisitor

Definition at line 31 of file annotationChecker.php.

Member Function Documentation

◆ afterTraverse()

Node [] null NodeVisitor::afterTraverse ( array  $nodes)

Called once after traversal.

Return value semantics:

  • ‪null: $nodes stays as-is
  • ‪otherwise: $nodes is set to the return value
Parameters
Node[]$nodes‪Array of nodes
Returns
‪Node[]|null Array of nodes

Definition at line 192 of file docBlockChecker.php.

◆ beforeTraverse()

Node [] null NodeVisitor::beforeTraverse ( array  $nodes)

Called once before traversal.

Return value semantics:

  • ‪null: $nodes stays as-is
  • ‪otherwise: $nodes is set to the return value
Parameters
Node[]$nodes‪Array of nodes
Returns
‪Node[]|null Array of nodes

Definition at line 68 of file docBlockChecker.php.

◆ enterNode() [1/2]

NodeVisitor::enterNode ( Node  $node)

Definition at line 37 of file annotationChecker.php.

References $matches.

◆ enterNode() [2/2]

int Node null NodeVisitor::enterNode ( Node  $node)

Called when entering a node.

Return value semantics:

  • ‪null => $node stays as-is
  • ‪NodeTraverser::DONT_TRAVERSE_CHILDREN => Children of $node are not traversed. $node stays as-is
  • ‪NodeTraverser::STOP_TRAVERSAL => Traversal is aborted. $node stays as-is
  • ‪otherwise => $node is set to the return value
Parameters
Node$node‪Node
Returns
‪int|Node|null Replacement node (or special return value)

Definition at line 91 of file docBlockChecker.php.

◆ leaveNode()

int Node Node [] null NodeVisitor::leaveNode ( Node  $node)

Called when leaving a node.

Return value semantics:

  • ‪null => $node stays as-is
  • ‪NodeTraverser::REMOVE_NODE => $node is removed from the parent array
  • ‪NodeTraverser::STOP_TRAVERSAL => Traversal is aborted. $node stays as-is
  • ‪array (of Nodes) => The return value is merged into the parent array (at the position of the $node)
  • ‪otherwise => $node is set to the return value
Parameters
Node$node‪Node
Returns
‪int|Node|Node[]|null Replacement node (or special return value)

Definition at line 176 of file docBlockChecker.php.

Member Data Documentation

◆ $classCommentError

string null NodeVisitor::$classCommentError

Definition at line 43 of file docBlockChecker.php.

◆ $className

string null NodeVisitor::$className

Definition at line 39 of file docBlockChecker.php.

◆ $docBlockFactory

DocBlockFactory NodeVisitor::$docBlockFactory
private

Definition at line 31 of file docBlockChecker.php.

◆ $hasErrors

bool NodeVisitor::$hasErrors = false

Definition at line 55 of file docBlockChecker.php.

◆ $matches

array NodeVisitor::$matches = array( )

Definition at line 35 of file annotationChecker.php.

Referenced by enterNode().

◆ $methods

array NodeVisitor::$methods = array( )

Definition at line 51 of file docBlockChecker.php.

◆ $namespace

string null NodeVisitor::$namespace

Definition at line 35 of file docBlockChecker.php.

◆ $properties

array NodeVisitor::$properties = array( )

Definition at line 47 of file docBlockChecker.php.