PHP Класс Phan\AST\UnionTypeVisitor

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

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

Метод Описание
__construct ( CodeBase $code_base, Context $context, boolean $should_catch_issue_exception = true )
unionTypeFromClassNode ( CodeBase $code_base, Context $context, ast\Node | mixed $node ) : UnionType
unionTypeFromNode ( CodeBase $code_base, Context $context, ast\Node | mixed $node, boolean $should_catch_issue_exception = true ) : UnionType
visit ( ast\Node $node ) : UnionType Default visitor for node kinds that do not have an overriding method
visitArray ( ast\Node $node ) : UnionType Visit a node with kind \ast\AST_ARRAY
visitAssign ( ast\Node $node ) : UnionType Visit a node with kind \ast\AST_ASSIGN
visitAssignRef ( ast\Node $node ) : UnionType Visit a node with kind \ast\AST_ASSIGN_REF
visitBinaryOp ( ast\Node $node ) : UnionType Visit a node with kind \ast\AST_BINARY_OP
visitCall ( ast\Node $node ) : UnionType Visit a node with kind \ast\AST_CALL
visitCast ( ast\Node $node ) : UnionType Visit a node with kind \ast\AST_CAST
visitClassConst ( ast\Node $node ) : UnionType Visit a node with kind \ast\AST_CLASS_CONST
visitClone ( ast\Node $node ) : UnionType Visit a node with kind \ast\AST_CLONE
visitClosure ( ast\Node\Decl $node ) : UnionType Visit a node with kind \ast\AST_CLOSURE
visitCoalesce ( ast\Node $node ) : UnionType Visit a node with kind \ast\AST_COALESCE
visitConditional ( ast\Node $node ) : UnionType Visit a node with kind \ast\AST_CONDITIONAL
visitConst ( ast\Node $node ) : UnionType Visit a node with kind \ast\AST_CONST
visitDim ( ast\Node $node ) : UnionType Visit a node with kind \ast\AST_DIM
visitEmpty ( ast\Node $node ) : UnionType Visit a node with kind \ast\AST_EMPTY
visitEncapsList ( ast\Node $node ) : UnionType Visit a node with kind \ast\AST_ENCAPS_LIST
visitGreater ( ast\Node $node ) : UnionType Visit a node with kind \ast\AST_GREATER
visitGreaterEqual ( ast\Node $node ) : UnionType Visit a node with kind \ast\AST_GREATER_EQUAL
visitIncludeOrEval ( ast\Node $node ) : UnionType Visit a node with kind \ast\AST_INCLUDE_OR_EVAL
visitInstanceOf ( ast\Node $node ) : UnionType Visit a node with kind \ast\AST_INSTANCEOF
visitIsset ( ast\Node $node ) : UnionType Visit a node with kind \ast\AST_ISSET
visitMagicConst ( ast\Node $node ) : UnionType Visit a node with kind \ast\AST_MAGIC_CONST
visitMethodCall ( ast\Node $node ) : UnionType Visit a node with kind \ast\AST_METHOD_CALL
visitName ( ast\Node $node ) : UnionType Visit a node with kind \ast\AST_NAME
visitNew ( ast\Node $node ) : UnionType Visit a node with kind \ast\AST_NEW
visitPostDec ( ast\Node $node ) : UnionType Visit a node with kind \ast\AST_POST_DEC
visitPostInc ( ast\Node $node ) : UnionType Visit a node with kind \ast\AST_POST_INC
visitPreDec ( ast\Node $node ) : UnionType Visit a node with kind \ast\AST_PRE_DEC
visitPreInc ( ast\Node $node ) : UnionType Visit a node with kind \ast\AST_PRE_INC
visitProp ( ast\Node $node ) : UnionType Visit a node with kind \ast\AST_PROP
visitShellExec ( ast\Node $node ) : UnionType Visit a node with kind \ast\AST_SHELL_EXEC
visitStaticCall ( ast\Node $node ) : UnionType Visit a node with kind \ast\AST_STATIC_CALL
visitStaticProp ( ast\Node $node ) : UnionType Visit a node with kind \ast\AST_STATIC_PROP
visitType ( ast\Node $node ) : UnionType Visit a node with kind \ast\AST_TYPE
visitUnaryMinus ( ast\Node $node ) : UnionType Visit a node with kind \ast\AST_UNARY_MINUS
visitUnaryOp ( ast\Node $node ) : UnionType Visit a node with kind \ast\AST_UNARY_OP
visitVar ( ast\Node $node ) : UnionType Visit a node with kind \ast\AST_VAR

Приватные методы

Метод Описание
classListFromNode ( ast\Node $node ) : Generator | Clazz[]
visitClassNode ( ast\Node $node ) : UnionType *

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

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

public __construct ( CodeBase $code_base, Context $context, boolean $should_catch_issue_exception = true )
$code_base Phan\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
$should_catch_issue_exception boolean Set to true to cause loggable issues to be thrown instead of emitted as issues to the log.

unionTypeFromClassNode() публичный статический Метод

public static unionTypeFromClassNode ( CodeBase $code_base, Context $context, ast\Node | mixed $node ) : UnionType
$code_base Phan\CodeBase The code base within which we're operating
$context Phan\Language\Context $context The context of the parser at the node for which we'd like to determine a type
$node ast\Node | mixed The node for which we'd like to determine its type
Результат Phan\Language\UnionType The UnionType associated with the given node in the given Context within the given CodeBase

unionTypeFromNode() публичный статический Метод

public static unionTypeFromNode ( CodeBase $code_base, Context $context, ast\Node | mixed $node, boolean $should_catch_issue_exception = true ) : UnionType
$code_base Phan\CodeBase The code base within which we're operating
$context Phan\Language\Context $context The context of the parser at the node for which we'd like to determine a type
$node ast\Node | mixed The node for which we'd like to determine its type
$should_catch_issue_exception boolean Set to true to cause loggable issues to be thrown instead
Результат Phan\Language\UnionType The UnionType associated with the given node in the given Context within the given CodeBase

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

Default visitor for node kinds that do not have an overriding method
public visit ( ast\Node $node ) : UnionType
$node ast\Node An AST node we'd like to determine the UnionType for
Результат Phan\Language\UnionType The set of types associated with the given node

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

Visit a node with kind \ast\AST_ARRAY
public visitArray ( ast\Node $node ) : UnionType
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
Результат Phan\Language\UnionType The set of types that are possibly produced by the given node

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

Visit a node with kind \ast\AST_ASSIGN
public visitAssign ( ast\Node $node ) : UnionType
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
Результат Phan\Language\UnionType The set of types that are possibly produced by the given node

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

Visit a node with kind \ast\AST_ASSIGN_REF
public visitAssignRef ( ast\Node $node ) : UnionType
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
Результат Phan\Language\UnionType The set of types that are possibly produced by the given node

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

Visit a node with kind \ast\AST_BINARY_OP
public visitBinaryOp ( ast\Node $node ) : UnionType
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
Результат Phan\Language\UnionType The set of types that are possibly produced by the given node

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

Visit a node with kind \ast\AST_CALL
public visitCall ( ast\Node $node ) : UnionType
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
Результат Phan\Language\UnionType The set of types that are possibly produced by the given node

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

Visit a node with kind \ast\AST_CAST
public visitCast ( ast\Node $node ) : UnionType
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
Результат Phan\Language\UnionType The set of types that are possibly produced by the given node

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

Visit a node with kind \ast\AST_CLASS_CONST
public visitClassConst ( ast\Node $node ) : UnionType
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
Результат Phan\Language\UnionType The set of types that are possibly produced by the given node

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

Visit a node with kind \ast\AST_CLONE
public visitClone ( ast\Node $node ) : UnionType
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
Результат Phan\Language\UnionType The set of types that are possibly produced by the given node

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

Visit a node with kind \ast\AST_CLOSURE
public visitClosure ( ast\Node\Decl $node ) : UnionType
$node ast\Node\Decl A node of the type indicated by the method name that we'd like to figure out the type that it produces.
Результат Phan\Language\UnionType The set of types that are possibly produced by the given node

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

Visit a node with kind \ast\AST_COALESCE
public visitCoalesce ( ast\Node $node ) : UnionType
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
Результат Phan\Language\UnionType The set of types that are possibly produced by the given node

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

Visit a node with kind \ast\AST_CONDITIONAL
public visitConditional ( ast\Node $node ) : UnionType
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
Результат Phan\Language\UnionType The set of types that are possibly produced by the given node

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

Visit a node with kind \ast\AST_CONST
public visitConst ( ast\Node $node ) : UnionType
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
Результат Phan\Language\UnionType The set of types that are possibly produced by the given node

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

Visit a node with kind \ast\AST_DIM
public visitDim ( ast\Node $node ) : UnionType
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
Результат Phan\Language\UnionType The set of types that are possibly produced by the given node

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

Visit a node with kind \ast\AST_EMPTY
public visitEmpty ( ast\Node $node ) : UnionType
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
Результат Phan\Language\UnionType The set of types that are possibly produced by the given node

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

Visit a node with kind \ast\AST_ENCAPS_LIST
public visitEncapsList ( ast\Node $node ) : UnionType
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
Результат Phan\Language\UnionType The set of types that are possibly produced by the given node

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

Visit a node with kind \ast\AST_GREATER
public visitGreater ( ast\Node $node ) : UnionType
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
Результат Phan\Language\UnionType The set of types that are possibly produced by the given node

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

Visit a node with kind \ast\AST_GREATER_EQUAL
public visitGreaterEqual ( ast\Node $node ) : UnionType
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
Результат Phan\Language\UnionType The set of types that are possibly produced by the given node

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

Visit a node with kind \ast\AST_INCLUDE_OR_EVAL
public visitIncludeOrEval ( ast\Node $node ) : UnionType
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
Результат Phan\Language\UnionType The set of types that are possibly produced by the given node

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

Visit a node with kind \ast\AST_INSTANCEOF
public visitInstanceOf ( ast\Node $node ) : UnionType
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
Результат Phan\Language\UnionType The set of types that are possibly produced by the given node

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

Visit a node with kind \ast\AST_ISSET
public visitIsset ( ast\Node $node ) : UnionType
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
Результат Phan\Language\UnionType The set of types that are possibly produced by the given node

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

Visit a node with kind \ast\AST_MAGIC_CONST
public visitMagicConst ( ast\Node $node ) : UnionType
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
Результат Phan\Language\UnionType The set of types that are possibly produced by the given node

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

Visit a node with kind \ast\AST_METHOD_CALL
public visitMethodCall ( ast\Node $node ) : UnionType
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
Результат Phan\Language\UnionType The set of types that are possibly produced by the given node

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

Visit a node with kind \ast\AST_NAME
public visitName ( ast\Node $node ) : UnionType
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
Результат Phan\Language\UnionType The set of types that are possibly produced by the given node

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

Visit a node with kind \ast\AST_NEW
public visitNew ( ast\Node $node ) : UnionType
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
Результат Phan\Language\UnionType The set of types that are possibly produced by the given node

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

Visit a node with kind \ast\AST_POST_DEC
public visitPostDec ( ast\Node $node ) : UnionType
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
Результат Phan\Language\UnionType The set of types that are possibly produced by the given node

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

Visit a node with kind \ast\AST_POST_INC
public visitPostInc ( ast\Node $node ) : UnionType
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
Результат Phan\Language\UnionType The set of types that are possibly produced by the given node

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

Visit a node with kind \ast\AST_PRE_DEC
public visitPreDec ( ast\Node $node ) : UnionType
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
Результат Phan\Language\UnionType The set of types that are possibly produced by the given node

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

Visit a node with kind \ast\AST_PRE_INC
public visitPreInc ( ast\Node $node ) : UnionType
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
Результат Phan\Language\UnionType The set of types that are possibly produced by the given node

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

Visit a node with kind \ast\AST_PROP
public visitProp ( ast\Node $node ) : UnionType
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
Результат Phan\Language\UnionType The set of types that are possibly produced by the given node

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

Visit a node with kind \ast\AST_SHELL_EXEC
public visitShellExec ( ast\Node $node ) : UnionType
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
Результат Phan\Language\UnionType The set of types that are possibly produced by the given node

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

Visit a node with kind \ast\AST_STATIC_CALL
public visitStaticCall ( ast\Node $node ) : UnionType
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
Результат Phan\Language\UnionType The set of types that are possibly produced by the given node

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

Visit a node with kind \ast\AST_STATIC_PROP
public visitStaticProp ( ast\Node $node ) : UnionType
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
Результат Phan\Language\UnionType The set of types that are possibly produced by the given node

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

Visit a node with kind \ast\AST_TYPE
public visitType ( ast\Node $node ) : UnionType
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
Результат Phan\Language\UnionType The set of types that are possibly produced by the given node

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

Visit a node with kind \ast\AST_UNARY_MINUS
public visitUnaryMinus ( ast\Node $node ) : UnionType
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
Результат Phan\Language\UnionType The set of types that are possibly produced by the given node

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

Visit a node with kind \ast\AST_UNARY_OP
public visitUnaryOp ( ast\Node $node ) : UnionType
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
Результат Phan\Language\UnionType The set of types that are possibly produced by the given node

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

Visit a node with kind \ast\AST_VAR
public visitVar ( ast\Node $node ) : UnionType
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
Результат Phan\Language\UnionType The set of types that are possibly produced by the given node