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

$newInterface

$newInterface : 

Type

$newContent

$newContent : 

Type

$methodStack

$methodStack : 

Type

$context

$context : 

Type

$dumper

$dumper : 

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) 

{@inheritDoc}

Parameters

array $nodes

afterTraverse()

afterTraverse(array  $node) 

{@inheritDoc}

Parameters

array $node

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) 

do nothing

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

buildNewInterface()

buildNewInterface() : \Trismegiste\Mondrian\Parser\PhpFile

Build the new PhpFile for the new contract

Throws

\RuntimeException

If no inside a PhpFile (WAT?)

Returns

\Trismegiste\Mondrian\Parser\PhpFile

enterStandardMethod()

enterStandardMethod(\PHPParser_Node_Stmt_ClassMethod  $node) 

Stacks the method for the new interface

Parameters

\PHPParser_Node_Stmt_ClassMethod $node

writeUpdated()

writeUpdated(array  $fileList) 

Write a list of PhpFile

Parameters

array $fileList