PHP 클래스 Phan\Language\Scope

파일 보기 프로젝트 열기: etsy/phan 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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[]