CloneableInstantiable
ExtendsPhpParser\NodeVisitorAbstract
ImplementsPhpParser\NodeVisitor
Methods
public __construct(?PhpParser\ErrorHandler $errorHandler = NULL, array $options = [])
 

Constructs a name resolution visitor.

Options:

  • preserveOriginalNames (default false): An "originalName" attribute will be added to
    all name nodes that underwent resolution.
  • replaceNodes (default true): Resolved names are replaced in-place. Otherwise, a
    resolvedName attribute is added. (Names that cannot be statically resolved receive a
    namespacedName attribute, as usual.)
    public PhpParser\NodeVisitorAbstract::afterTraverse(array $nodes)
    public beforeTraverse(array $nodes)
    public enterNode(PhpParser\Node $node)
    public getNameContext() : PhpParser\NameContext
     

    Get name resolution context.

    • return NameContext
    public PhpParser\NodeVisitorAbstract::leaveNode(PhpParser\Node $node)
    Properties
    protected $nameContext
     
    • var NameContext Naming context
    protected $preserveOriginalNames
     
    • var bool Whether to preserve original names
    protected $replaceNodes
     
    • var bool Whether to replace resolved nodes in place, or to add resolvedNode attributes
    Methods
    protected addNamespacedName(PhpParser\Node $node)
    protected resolveClassName(PhpParser\Node\Name $name)
    protected resolveName(PhpParser\Node\Name $name, int $type) : PhpParser\Node\Name
     

    Resolve name, according to name resolver options.

    • return Name Resolved name, or original name with attribute
    Methods
    private addAlias(PhpParser\Node\Stmt\UseUse $use, $type, ?PhpParser\Node\Name $prefix = NULL)
    private resolveSignature( $node)
     
      private resolveType( $node)
      © 2020 Bruce Wells
      Search Namespaces \ Classes
      ConfigurationNumbers (0-9.) only