PHP Class Phan\AST\ContextNode

Afficher le fichier Open project: etsy/phan Class Usage Examples

Méthodes publiques

Méthode Description
__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

Method Details

__construct() public méthode

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() public méthode

Perform some backwards compatibility checks on a node
public analyzeBackwardCompatibility ( ) : void
Résultat void

getClassConst() public méthode

public getClassConst ( ) : Phan\Language\Element\ClassConstant
Résultat Phan\Language\Element\ClassConstant Get the (non-class) constant associated with this node in this context

getClassList() public méthode

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
Résultat Phan\Language\Element\Clazz[] A list of classes representing the non-native types associated with the given node

getClosure() public méthode

public getClosure ( ) : Func
Résultat Phan\Language\Element\Func

getConst() public méthode

public getConst ( ) : Phan\Language\Element\GlobalConstant
Résultat Phan\Language\Element\GlobalConstant Get the (non-class) constant associated with this node in this context

getFunction() public méthode

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.
Résultat Phan\Language\Element\FunctionInterface A method with the given name in the given context

getMethod() public méthode

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
Résultat Phan\Language\Element\Method A method with the given name on the class referenced from the given node

getOrCreateProperty() public méthode

public getOrCreateProperty ( string $property_name ) : Phan\Language\Element\Property
$property_name string
Résultat Phan\Language\Element\Property A variable in scope or a new variable

getOrCreateVariable() public méthode

public getOrCreateVariable ( ) : Variable
Résultat Phan\Language\Element\Variable A variable in scope or a new variable

getProperty() public méthode

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
Résultat Phan\Language\Element\Property A variable in scope or a new variable

getQualifiedName() public méthode

Get a fully qualified name form a node
public getQualifiedName ( ) : string
Résultat string

getQualifiedNameList() public méthode

Get a list of fully qualified names from a node
public getQualifiedNameList ( ) : array
Résultat array

getUnqualifiedNameForAnonymousClass() public méthode

public getUnqualifiedNameForAnonymousClass ( ) : string
Résultat string A unique and stable name for an anonymous class

getVariable() public méthode

public getVariable ( ) : Variable
Résultat Phan\Language\Element\Variable A variable in scope or a new variable

getVariableName() public méthode

public getVariableName ( ) : string
Résultat string A variable name associated with the given node