PHP Class Phan\Language\Scope\GlobalScope

Inheritance: extends Phan\Language\Scope
Afficher le fichier Open project: etsy/phan

Méthodes publiques

Méthode Description
addGlobalVariable ( Variable $variable ) : void
addVariable ( Variable $variable ) : void
getGlobalVariableByName ( string $name ) : Variable
getVariableByName ( string $name ) : Variable
getVariableMap ( ) : array
hasGlobalVariableWithName ( string $name ) : boolean
hasVariableWithName ( string $name ) : boolean
isInClassScope ( ) : boolean
isInFunctionLikeScope ( ) : boolean
withVariable ( Variable $variable ) : Scope

Method Details

addGlobalVariable() public méthode

public addGlobalVariable ( Variable $variable ) : void
$variable Phan\Language\Element\Variable A variable to add to the set of global variables
Résultat void

addVariable() public méthode

public addVariable ( Variable $variable ) : void
$variable Phan\Language\Element\Variable
Résultat void

getGlobalVariableByName() public méthode

public getGlobalVariableByName ( string $name ) : Variable
$name string
Résultat Phan\Language\Element\Variable The global variable with the given name

getVariableByName() public méthode

public getVariableByName ( string $name ) : Variable
$name string
Résultat Phan\Language\Element\Variable

getVariableMap() public méthode

public getVariableMap ( ) : array
Résultat array A map from name to Variable in this scope

hasGlobalVariableWithName() public méthode

public hasGlobalVariableWithName ( string $name ) : boolean
$name string
Résultat boolean True if a global variable with the given name exists

hasVariableWithName() public méthode

public hasVariableWithName ( string $name ) : boolean
$name string
Résultat boolean True if a variable with the given name is defined within this scope

isInClassScope() public méthode

public isInClassScope ( ) : boolean
Résultat boolean True if we're in a class scope

isInFunctionLikeScope() public méthode

public isInFunctionLikeScope ( ) : boolean
Résultat boolean True if we're in a method/function/closure scope

withVariable() public méthode

public withVariable ( Variable $variable ) : Scope
$variable Phan\Language\Element\Variable A variable to add to the local scope
Résultat Phan\Language\Scope