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

$currentMethodRelevant

$currentMethodRelevant : 

Type

$factoryMethodStack

$factoryMethodStack : 

Type

$dumper

$dumper : 

Type

$currentClassStmts

$currentClassStmts : 

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

afterTraverse()

afterTraverse(array  $nodes) 

Writes modified files

Parameters

array $nodes

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

enterNewInstance()

enterNewInstance(\PHPParser_Node_Expr_New  $node) : \PHPParser_Node_Expr_MethodCall|null

Enter in a new instance statement (only process "hard-coded" classname)

Parameters

\PHPParser_Node_Expr_New $node

Returns

\PHPParser_Node_Expr_MethodCall|null

getProcessedArgument()

getProcessedArgument(array  $args) 

Parameters

array $args