PHP Класс Phan\AST\ContextNode

Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__construct ( CodeBase $code_base, Context $context, ast\Node | string | null $node )
analyzeBackwardCompatibility ( ) : void Perform some backwards compatibility checks on a node
getClassConst ( ) : Phan\Language\Element\ClassConstant
getClassList ( boolean $ignore_missing_classes = false ) : Clazz[]
getClosure ( ) : Func
getConst ( ) : Phan\Language\Element\GlobalConstant
getFunction ( string $function_name, boolean $is_function_declaration = false ) : Phan\Language\Element\FunctionInterface
getMethod ( ast\Node | string $method_name, boolean $is_static ) : Method
getOrCreateProperty ( string $property_name ) : Phan\Language\Element\Property
getOrCreateVariable ( ) : Variable
getProperty ( string | ast\Node $property_name ) : Phan\Language\Element\Property
getQualifiedName ( ) : string Get a fully qualified name form a node
getQualifiedNameList ( ) : array Get a list of fully qualified names from a node
getUnqualifiedNameForAnonymousClass ( ) : string
getVariable ( ) : Variable
getVariableName ( ) : string

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

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

public __construct ( CodeBase $code_base, Context $context, ast\Node | string | null $node )
$code_base Phan\CodeBase
$context Phan\Language\Context
$node ast\Node | string | null

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

Perform some backwards compatibility checks on a node
public analyzeBackwardCompatibility ( ) : void
Результат void

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

public getClassConst ( ) : Phan\Language\Element\ClassConstant
Результат Phan\Language\Element\ClassConstant Get the (non-class) constant associated with this node in this context

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

public getClassList ( boolean $ignore_missing_classes = false ) : Clazz[]
$ignore_missing_classes boolean If set to true, missing classes will be ignored and exceptions will be inhibited
Результат Phan\Language\Element\Clazz[] A list of classes representing the non-native types associated with the given node

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

public getClosure ( ) : Func
Результат Phan\Language\Element\Func

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

public getConst ( ) : Phan\Language\Element\GlobalConstant
Результат Phan\Language\Element\GlobalConstant Get the (non-class) constant associated with this node in this context

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

public getFunction ( string $function_name, boolean $is_function_declaration = false ) : Phan\Language\Element\FunctionInterface
$function_name string The name of the function we'd like to look up
$is_function_declaration boolean This must be set to true if we're getting a function that is being declared and false if we're getting a function being called.
Результат Phan\Language\Element\FunctionInterface A method with the given name in the given context

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

public getMethod ( ast\Node | string $method_name, boolean $is_static ) : Method
$method_name ast\Node | string Either then name of the method or a node that produces the name of the method.
$is_static boolean Set to true if this is a static method call
Результат Phan\Language\Element\Method A method with the given name on the class referenced from the given node

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

public getOrCreateProperty ( string $property_name ) : Phan\Language\Element\Property
$property_name string
Результат Phan\Language\Element\Property A variable in scope or a new variable

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

public getOrCreateVariable ( ) : Variable
Результат Phan\Language\Element\Variable A variable in scope or a new variable

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

public getProperty ( string | ast\Node $property_name ) : Phan\Language\Element\Property
$property_name string | ast\Node The name of the property we're looking up
Результат Phan\Language\Element\Property A variable in scope or a new variable

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

Get a fully qualified name form a node
public getQualifiedName ( ) : string
Результат string

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

Get a list of fully qualified names from a node
public getQualifiedNameList ( ) : array
Результат array

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

public getUnqualifiedNameForAnonymousClass ( ) : string
Результат string A unique and stable name for an anonymous class

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

public getVariable ( ) : Variable
Результат Phan\Language\Element\Variable A variable in scope or a new variable

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

public getVariableName ( ) : string
Результат string A variable name associated with the given node