\Trismegiste\Mondrian\VisitorSymbolMap

SymbolMap is a class to collect list of class/interface/method name

It fills the Context with symbols

Summary

Methods
Properties
Constants
enterNode()
leaveNode()
beforeTraverse()
__construct()
afterTraverse()
No public properties found
No constants found
enterClassNode()
enterInterfaceNode()
enterTraitNode()
enterPublicMethodNode()
getCurrentMethodIndex()
extractAnnotation()
resolveClassName()
getNamespacedName()
importSignatureTrait()
$currentClass
$currentMethod
$namespace
$aliases
$currentPhpFile
N/A
No private methods found
$context
N/A

Properties

$currentClass

$currentClass : 

Type

$currentMethod

$currentMethod : 

Type

$namespace

$namespace : null|\Trismegiste\Mondrian\Visitor\PHPParser_Node_Name

Type

null|\Trismegiste\Mondrian\Visitor\PHPParser_Node_Name — Current namespace

$aliases

$aliases : array

Type

array — Currently defined namespace and class aliases

$currentPhpFile

$currentPhpFile : 

current file

Type

$context

$context : 

Type

Methods

enterNode()

enterNode(\PHPParser_Node  $node) 

Parameters

\PHPParser_Node $node

leaveNode()

leaveNode(\PHPParser_Node  $node) 

{@inheritDoc}

Parameters

\PHPParser_Node $node

beforeTraverse()

beforeTraverse(array  $nodes) 

Parameters

array $nodes

__construct()

__construct(\Trismegiste\Mondrian\Visitor\Context  $ctx) 

Build the collector

Parameters

\Trismegiste\Mondrian\Visitor\Context $ctx

afterTraverse()

afterTraverse(array  $dummy) 

Compiling the pass : resolving symbols in the context

Parameters

array $dummy

enterClassNode()

enterClassNode(\PHPParser_Node_Stmt_Class  $node) 

Visits a class node

Parameters

\PHPParser_Node_Stmt_Class $node

enterInterfaceNode()

enterInterfaceNode(\PHPParser_Node_Stmt_Interface  $node) 

Visits an interface node

Parameters

\PHPParser_Node_Stmt_Interface $node

enterTraitNode()

enterTraitNode(\PHPParser_Node_Stmt_Trait  $node) 

Visits an trait node

Parameters

\PHPParser_Node_Stmt_Trait $node

enterPublicMethodNode()

enterPublicMethodNode(\PHPParser_Node_Stmt_ClassMethod  $node) 

Visits a public method node

Parameters

\PHPParser_Node_Stmt_ClassMethod $node

getCurrentMethodIndex()

getCurrentMethodIndex() : string

the vertex name for a MethodVertex

Returns

string

extractAnnotation()

extractAnnotation(\PHPParser_Node_Stmt  $node) 

Extracts annotations in the comment of a statement and injects them in attribute of the node

Parameters

\PHPParser_Node_Stmt $node

resolveClassName()

resolveClassName(\PHPParser_Node_Name  $src) : \PHPParser_Node_Name|\PHPParser_Node_Name_FullyQualified

resolve the Name with current namespace and alias

Parameters

\PHPParser_Node_Name $src

Returns

\PHPParser_Node_Name|\PHPParser_Node_Name_FullyQualified

getNamespacedName()

getNamespacedName(\PHPParser_Node  $node) : string

Helper : get the FQCN of the given $node->name

Parameters

\PHPParser_Node $node

Returns

string

importSignatureTrait()

importSignatureTrait(\PHPParser_Node_Stmt_TraitUse  $node) 

Parameters

\PHPParser_Node_Stmt_TraitUse $node