PHP Class Trismegiste\Mondrian\Visitor\InterfaceExtractor

Inheritance: extends PublicCollector
Datei anzeigen Open project: trismegiste/mondrian

Protected Properties

Property Type Description
$context a temporary stack of methods for the currently new interface
$dumper
$methodStack a list of PhpFile
$newContent
$newInterface

Public Methods

Method Description
__construct ( Refactored $ctx, PhpPersistence $callable )
afterTraverse ( array $node ) {@inheritDoc}
beforeTraverse ( array $nodes ) {@inheritDoc}
leaveNode ( PHPParser_Node $node ) {@inheritDoc}

Protected Methods

Method Description
buildNewInterface ( ) : PhpFile Build the new PhpFile for the new contract
enterClassNode ( PHPParser_Node_Stmt_Class $node ) {@inheritDoc}
enterInterfaceNode ( PHPParser_Node_Stmt_Interface $node ) {@inheritDoc}
enterPublicMethodNode ( PHPParser_Node_Stmt_ClassMethod $node ) {@inheritDoc}
enterStandardMethod ( PHPParser_Node_Stmt_ClassMethod $node ) Stacks the method for the new interface
enterTraitNode ( PHPParser_Node_Stmt_Trait $node ) do nothing
writeUpdated ( array $fileList ) Write a list of PhpFile

Method Details

__construct() public method

public __construct ( Refactored $ctx, PhpPersistence $callable )
$ctx Trismegiste\Mondrian\Refactor\Refactored
$callable Trismegiste\Mondrian\Parser\PhpPersistence

afterTraverse() public method

{@inheritDoc}
public afterTraverse ( array $node )
$node array

beforeTraverse() public method

{@inheritDoc}
public beforeTraverse ( array $nodes )
$nodes array

buildNewInterface() protected method

Build the new PhpFile for the new contract
protected buildNewInterface ( ) : PhpFile
return Trismegiste\Mondrian\Parser\PhpFile

enterClassNode() protected method

{@inheritDoc}
protected enterClassNode ( PHPParser_Node_Stmt_Class $node )
$node PHPParser_Node_Stmt_Class

enterInterfaceNode() protected method

{@inheritDoc}
protected enterInterfaceNode ( PHPParser_Node_Stmt_Interface $node )
$node PHPParser_Node_Stmt_Interface

enterPublicMethodNode() protected method

{@inheritDoc}
protected enterPublicMethodNode ( PHPParser_Node_Stmt_ClassMethod $node )
$node PHPParser_Node_Stmt_ClassMethod

enterStandardMethod() protected method

Stacks the method for the new interface
protected enterStandardMethod ( PHPParser_Node_Stmt_ClassMethod $node )
$node PHPParser_Node_Stmt_ClassMethod

enterTraitNode() protected method

do nothing
protected enterTraitNode ( PHPParser_Node_Stmt_Trait $node )
$node PHPParser_Node_Stmt_Trait

leaveNode() public method

{@inheritDoc}
public leaveNode ( PHPParser_Node $node )
$node PHPParser_Node

writeUpdated() protected method

Write a list of PhpFile
protected writeUpdated ( array $fileList )
$fileList array

Property Details

$context protected_oe property

a temporary stack of methods for the currently new interface
protected $context

$dumper protected_oe property

protected $dumper

$methodStack protected_oe property

a list of PhpFile
protected $methodStack

$newContent protected_oe property

protected $newContent

$newInterface protected_oe property

protected $newInterface