PHP Класс Phan\BlockAnalysisVisitor

Наследование: extends Phan\AST\AnalysisVisitor
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( CodeBase $code_base, Context $context, ast\Node $parent_node = null, integer $depth )
__construct ( CodeBase $code_base, Context $context, ast\Node $parent_node = null, integer $depth )
visit ( ast\Node $node ) : Context For non-special nodes, we propagate the context and scope from the parent, through the children and return the modified scope
visitBranchedContext ( ast\Node $node ) : Context For nodes that are the root of mutually exclusive child nodes (if, try), we analyze each child in the parent context and then merge them together to try to guess what happens after the branching finishes.
visitCatchList ( ast\Node $node ) : Context
visitClass ( ast\Node\Decl $node ) : Context
visitClosedContext ( ast\Node $node ) : Context For 'closed context' items (classes, methods, functions, closures), we analyze children in the parent context, but then return the parent context itself unmodified by the children.
visitClosure ( ast\Node\Decl $node ) : Context
visitFuncDecl ( ast\Node\Decl $node ) : Context
visitIf ( ast\Node $node ) : Context
visitIfElem ( ast\Node $node ) : Context
visitMethod ( ast\Node\Decl $node ) : Context
visitTry ( ast\Node $node ) : Context

Описание методов

__construct() публичный Метод

public __construct ( CodeBase $code_base, Context $context, ast\Node $parent_node = null, integer $depth )
$code_base CodeBase The code base within which we're operating
$context Phan\Language\Context The context of the parser at the node for which we'd like to determine a type
$parent_node ast\Node The parent of the node being analyzed
$depth integer The depth of the node being analyzed in the AST

__construct() публичный Метод

public __construct ( CodeBase $code_base, Context $context, ast\Node $parent_node = null, integer $depth )
$code_base CodeBase The code base within which we're operating
$context Phan\Language\Context The context of the parser at the node for which we'd like to determine a type
$parent_node ast\Node The parent of the node being analyzed
$depth integer The depth of the node being analyzed in the AST

visit() публичный Метод

│ ▼ ┌──● │ ●──●──● │ ●──┘ │ ▼
public visit ( ast\Node $node ) : Context
$node ast\Node An AST node we'd like to determine the UnionType for
Результат Phan\Language\Context The updated context after visiting the node

visitBranchedContext() публичный Метод

│ ▼ ┌──●──┐ │ │ │ ● ● ● │ │ │ └──●──┘ │ ▼
public visitBranchedContext ( ast\Node $node ) : Context
$node ast\Node An AST node we'd like to determine the UnionType for
Результат Phan\Language\Context The updated context after visiting the node

visitCatchList() публичный Метод

public visitCatchList ( ast\Node $node ) : Context
$node ast\Node An AST node we'd like to determine the UnionType for
Результат Phan\Language\Context The updated context after visiting the node

visitClass() публичный Метод

public visitClass ( ast\Node\Decl $node ) : Context
$node ast\Node\Decl An AST node we'd like to determine the UnionType for
Результат Phan\Language\Context The updated context after visiting the node

visitClosedContext() публичный Метод

│ ▼ ┌──●────┐ │ │ ●──●──● │ ┌────┘ ● │ ▼
public visitClosedContext ( ast\Node $node ) : Context
$node ast\Node An AST node we'd like to determine the UnionType for
Результат Phan\Language\Context The updated context after visiting the node

visitClosure() публичный Метод

public visitClosure ( ast\Node\Decl $node ) : Context
$node ast\Node\Decl An AST node we'd like to determine the UnionType for
Результат Phan\Language\Context The updated context after visiting the node

visitFuncDecl() публичный Метод

public visitFuncDecl ( ast\Node\Decl $node ) : Context
$node ast\Node\Decl An AST node we'd like to determine the UnionType for
Результат Phan\Language\Context The updated context after visiting the node

visitIf() публичный Метод

public visitIf ( ast\Node $node ) : Context
$node ast\Node An AST node we'd like to determine the UnionType for
Результат Phan\Language\Context The updated context after visiting the node

visitIfElem() публичный Метод

public visitIfElem ( ast\Node $node ) : Context
$node ast\Node An AST node we'd like to determine the UnionType for
Результат Phan\Language\Context The updated context after visiting the node

visitMethod() публичный Метод

public visitMethod ( ast\Node\Decl $node ) : Context
$node ast\Node\Decl An AST node we'd like to determine the UnionType for
Результат Phan\Language\Context The updated context after visiting the node

visitTry() публичный Метод

public visitTry ( ast\Node $node ) : Context
$node ast\Node An AST node we'd like to determine the UnionType for
Результат Phan\Language\Context The updated context after visiting the node