PHP Класс Phan\Language\Scope

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

Защищенные свойства (Protected)

Свойство Тип Описание
$variable_map Phan\Language\Element\Variable[]

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

Метод Описание
__construct ( Scope $parent_scope = null, FQSEN $fqsen = null )
__toString ( ) : string
addGlobalVariable ( Variable $variable ) : void
addTemplateType ( Phan\Language\Type\TemplateType $template_type ) : void
addVariable ( Variable $variable ) : void
getClassFQSEN ( ) : FullyQualifiedClassName
getFQSEN ( )
getFunctionLikeFQSEN ( ) : FullyQualifiedMethodName | FullyQualifiedFunctionName
getGlobalVariableByName ( string $name ) : Variable
getParentScope ( ) : Scope
getTemplateType ( string $template_type_identifier ) : Phan\Language\Type\TemplateType
getTemplateTypeMap ( ) : array
getVariableByName ( string $name ) : Variable
getVariableMap ( ) : array
hasAnyTemplateType ( ) : boolean
hasFQSEN ( ) : boolean
hasGlobalVariableWithName ( string $name ) : boolean
hasParentScope ( ) : boolean
hasTemplateType ( string $template_type_identifier ) : boolean
hasVariableWithName ( string $name ) : boolean
isInClassScope ( ) : boolean
isInFunctionLikeScope ( ) : boolean
withVariable ( Variable $variable ) : Scope

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

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

public __construct ( Scope $parent_scope = null, FQSEN $fqsen = null )
$parent_scope Scope
$fqsen FQSEN

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

public __toString ( ) : string
Результат string A string representation of this scope

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

public addGlobalVariable ( Variable $variable ) : void
$variable Phan\Language\Element\Variable A variable to add to the set of global variables
Результат void

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

public addTemplateType ( Phan\Language\Type\TemplateType $template_type ) : void
$template_type Phan\Language\Type\TemplateType A template type parameterizing the generic class in scope
Результат void

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

public addVariable ( Variable $variable ) : void
$variable Phan\Language\Element\Variable
Результат void

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

public getClassFQSEN ( ) : FullyQualifiedClassName
Результат Phan\Language\FQSEN\FullyQualifiedClassName Crawl the scope hierarchy to get a class FQSEN.

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

public getFQSEN ( )

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

public getFunctionLikeFQSEN ( ) : FullyQualifiedMethodName | FullyQualifiedFunctionName
Результат Phan\Language\FQSEN\FullyQualifiedMethodName | Phan\Language\FQSEN\FullyQualifiedFunctionName Crawl the scope hierarchy to get a method FQSEN.

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

public getGlobalVariableByName ( string $name ) : Variable
$name string
Результат Phan\Language\Element\Variable The global variable with the given name

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

public getParentScope ( ) : Scope
Результат Scope Get the parent scope of this scope

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

public getTemplateType ( string $template_type_identifier ) : Phan\Language\Type\TemplateType
$template_type_identifier string
Результат Phan\Language\Type\TemplateType A TemplateType parameterizing the generic class in scope

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

public getTemplateTypeMap ( ) : array
Результат array The set of all template types parameterizing this generic class

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

public getVariableByName ( string $name ) : Variable
$name string
Результат Phan\Language\Element\Variable

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

public getVariableMap ( ) : array
Результат array A map from name to Variable in this scope

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

public hasAnyTemplateType ( ) : boolean
Результат boolean True if there are any template types parameterizing a generic class in this scope.

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

public hasFQSEN ( ) : boolean
Результат boolean True if this scope has an FQSEN

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

public hasGlobalVariableWithName ( string $name ) : boolean
$name string
Результат boolean True if a global variable with the given name exists

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

public hasParentScope ( ) : boolean
Результат boolean True if this scope has a parent scope

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

public hasTemplateType ( string $template_type_identifier ) : boolean
$template_type_identifier string
Результат boolean True if the given template type identifier is defined within this context

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

public hasVariableWithName ( string $name ) : boolean
$name string
Результат boolean True if a variable with the given name is defined within this scope

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

public isInClassScope ( ) : boolean
Результат boolean True if we're in a class scope

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

public isInFunctionLikeScope ( ) : boolean
Результат boolean True if we're in a method/function/closure scope

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

public withVariable ( Variable $variable ) : Scope
$variable Phan\Language\Element\Variable A variable to add to the local scope
Результат Scope

Описание свойств

$variable_map защищенное свойство

protected Variable[],Phan\Language\Element $variable_map
Результат Phan\Language\Element\Variable[]