Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. AbstractNodeVisitor.php

class AbstractNodeVisitor

Same name in this branch
  1. 11.1.x vendor/twig/twig/src/NodeVisitor/AbstractNodeVisitor.php \Twig\NodeVisitor\AbstractNodeVisitor

Inspired by https://github.com/nikic/PHP-Parser/tree/36a6dcd04e7b0285e8f0868f44bd49…

Copyright (c) 2011, Nikita Popov All rights reserved.

Hierarchy

  • class \PHPStan\PhpDocParser\Ast\AbstractNodeVisitor implements \PHPStan\PhpDocParser\Ast\NodeVisitor

Expanded class hierarchy of AbstractNodeVisitor

3 files declare their use of AbstractNodeVisitor
AnnotationHelper.php in vendor/slevomat/coding-standard/SlevomatCodingStandard/Helpers/AnnotationHelper.php
CloningVisitor.php in vendor/phpstan/phpdoc-parser/src/Ast/NodeVisitor/CloningVisitor.php
DisallowArrayTypeHintSyntaxSniff.php in vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/TypeHints/DisallowArrayTypeHintSyntaxSniff.php

File

vendor/phpstan/phpdoc-parser/src/Ast/AbstractNodeVisitor.php, line 11

Namespace

PHPStan\PhpDocParser\Ast
View source
abstract class AbstractNodeVisitor implements NodeVisitor {
    public function beforeTraverse(array $nodes) : ?array {
        return null;
    }
    public function enterNode(Node $node) {
        return null;
    }
    public function leaveNode(Node $node) {
        return null;
    }
    public function afterTraverse(array $nodes) : ?array {
        return null;
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
AbstractNodeVisitor::afterTraverse public function * Called once after traversal.
*
* Return value semantics:
* * null: $nodes stays as-is
* * otherwise: $nodes is set to the return value
*
*
Overrides NodeVisitor::afterTraverse
AbstractNodeVisitor::beforeTraverse public function * Called once before traversal.
*
* Return value semantics:
* * null: $nodes stays as-is
* * otherwise: $nodes is set to the return value
*
*
Overrides NodeVisitor::beforeTraverse
AbstractNodeVisitor::enterNode public function * Called when entering a node.
*
* Return value semantics:
* * null
* => $node stays as-is
* * array (of Nodes)
* => The return value is merged into the parent array (at the position of the $node)
* *…
Overrides NodeVisitor::enterNode 1
AbstractNodeVisitor::leaveNode public function * 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
* …
Overrides NodeVisitor::leaveNode
RSS feed
Powered by Drupal