PHP Class Trismegiste\Mondrian\Visitor\NewInstanceRefactor

Inheritance: extends PublicCollector
ファイルを表示 Open project: trismegiste/mondrian

Protected Properties

Property Type Description
$currentClassStmts
$currentMethodRelevant
$dumper
$factoryMethodStack

Public Methods

Method Description
__construct ( PhpPersistence $callable ) The ctor needs a service for persistence of modified files
afterTraverse ( array $nodes ) Writes modified files
enterNode ( PHPParser_Node $node )
leaveNode ( PHPParser_Node $node )

Protected Methods

Method Description
enterClassNode ( PHPParser_Node_Stmt_Class $node )
enterInterfaceNode ( PHPParser_Node_Stmt_Interface $node )
enterNewInstance ( PHPParser_Node_Expr_New $node ) : PHPParser_Node_Expr_MethodCall | null Enter in a new instance statement (only process "hard-coded" classname)
enterPublicMethodNode ( PHPParser_Node_Stmt_ClassMethod $node )
enterTraitNode ( PHPParser_Node_Stmt_Trait $node )

Private Methods

Method Description
getProcessedArgument ( array $args )

Method Details

__construct() public method

The ctor needs a service for persistence of modified files
public __construct ( PhpPersistence $callable )
$callable Trismegiste\Mondrian\Parser\PhpPersistence

afterTraverse() public method

Writes modified files
public afterTraverse ( array $nodes )
$nodes array

enterClassNode() protected method

protected enterClassNode ( PHPParser_Node_Stmt_Class $node )
$node PHPParser_Node_Stmt_Class

enterInterfaceNode() protected method

protected enterInterfaceNode ( PHPParser_Node_Stmt_Interface $node )
$node PHPParser_Node_Stmt_Interface

enterNewInstance() protected method

Enter in a new instance statement (only process "hard-coded" classname)
protected enterNewInstance ( PHPParser_Node_Expr_New $node ) : PHPParser_Node_Expr_MethodCall | null
$node PHPParser_Node_Expr_New
return PHPParser_Node_Expr_MethodCall | null

enterNode() public method

public enterNode ( PHPParser_Node $node )
$node PHPParser_Node

enterPublicMethodNode() protected method

protected enterPublicMethodNode ( PHPParser_Node_Stmt_ClassMethod $node )
$node PHPParser_Node_Stmt_ClassMethod

enterTraitNode() protected method

protected enterTraitNode ( PHPParser_Node_Stmt_Trait $node )
$node PHPParser_Node_Stmt_Trait

leaveNode() public method

public leaveNode ( PHPParser_Node $node )
$node PHPParser_Node

Property Details

$currentClassStmts protected_oe property

protected $currentClassStmts

$currentMethodRelevant protected_oe property

protected $currentMethodRelevant

$dumper protected_oe property

protected $dumper

$factoryMethodStack protected_oe property

protected $factoryMethodStack