\Trismegiste\Mondrian\VisitorPublicCollector

PublicCollector is an abstract node collector for public "things" of types

Summary

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

Properties

$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

$currentClass

$currentClass : 

Type

$currentMethod

$currentMethod : 

Type

Methods

beforeTraverse()

beforeTraverse(array  $nodes) 

Parameters

array $nodes

enterNode()

enterNode(\PHPParser_Node  $node) 

Parameters

\PHPParser_Node $node

leaveNode()

leaveNode(\PHPParser_Node  $node) 

{@inheritDoc}

Parameters

\PHPParser_Node $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

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