PHP 클래스 Phan\Language\Context

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

보호된 프로퍼티들

프로퍼티 타입 설명
$strict_types integer strict_types setting for the file

공개 메소드들

메소드 설명
__construct ( ) Create a new context
addGlobalScopeVariable ( Variable $variable ) : void
addScopeVariable ( Variable $variable ) : null Add a variable to this context's scope. Note that this does not create a new context. You're actually injecting the variable into the context. Use with caution.
getClassFQSEN ( ) : FullyQualifiedClassName
getClassInScope ( CodeBase $code_base ) : Clazz
getElementInScope ( CodeBase $code_base ) : TypedElement
getFunctionLikeFQSEN ( ) *
getFunctionLikeInScope ( CodeBase $code_base ) : Phan\Language\Element\FunctionInterface
getIsStrictTypes ( ) : boolean
getNamespace ( ) : string
getNamespaceMapFor ( integer $flags, string $name ) : FullyQualifiedGlobalStructuralElement
getScope ( ) : Scope
getScope ( ) : Scope
hasNamespaceMapFor ( integer $flags, string $name ) : boolean
hasSuppressIssue ( CodeBase $code_base, string $issue_name ) : boolean
isInClassScope ( ) : boolean
isInElementScope ( ) : boolean
isInFunctionLikeScope ( ) : boolean
isInGlobalScope ( ) : boolean
isInMethodScope ( ) : boolean
setScope ( Scope $scope ) : void Set the scope on the context
setScope ( Scope $scope ) : void Set the scope on the context
withNamespace ( string $namespace ) : Context *
withNamespaceMap ( integer $flags, string $alias, FullyQualifiedGlobalStructuralElement $target ) : Context
withScope ( Scope $scope ) : Context
withScope ( Scope $scope ) : Context
withScopeVariable ( Variable $variable ) : Context
withStrictTypes ( integer $strict_types ) : Context

메소드 상세

__construct() 공개 메소드

Create a new context
public __construct ( )

addGlobalScopeVariable() 공개 메소드

public addGlobalScopeVariable ( Variable $variable ) : void
$variable Phan\Language\Element\Variable A variable to add to the scope for the new context
리턴 void

addScopeVariable() 공개 메소드

Add a variable to this context's scope. Note that this does not create a new context. You're actually injecting the variable into the context. Use with caution.
public addScopeVariable ( Variable $variable ) : null
$variable Phan\Language\Element\Variable A variable to inject into this context
리턴 null

getClassFQSEN() 공개 메소드

public getClassFQSEN ( ) : FullyQualifiedClassName
리턴 Phan\Language\FQSEN\FullyQualifiedClassName A fully-qualified structural element name describing the current class in scope.

getClassInScope() 공개 메소드

public getClassInScope ( CodeBase $code_base ) : Clazz
$code_base Phan\CodeBase The global code base holding all state
리턴 Phan\Language\Element\Clazz Get the class in this scope, or fail real hard

getElementInScope() 공개 메소드

public getElementInScope ( CodeBase $code_base ) : TypedElement
$code_base Phan\CodeBase The code base from which to retrieve the TypedElement
리턴 Phan\Language\Element\TypedElement The element who's scope we're in. If we're in the global scope this method will go down in flames and take your process with it.

getFunctionLikeFQSEN() 공개 메소드

*

getFunctionLikeInScope() 공개 메소드

public getFunctionLikeInScope ( CodeBase $code_base ) : Phan\Language\Element\FunctionInterface
$code_base Phan\CodeBase The global code base holding all state
리턴 Phan\Language\Element\FunctionInterface Get the method in this scope or fail real hard

getIsStrictTypes() 공개 메소드

public getIsStrictTypes ( ) : boolean
리턴 boolean True if strict_types is set to 1 in this context.

getNamespace() 공개 메소드

public getNamespace ( ) : string
리턴 string The namespace of the file

getNamespaceMapFor() 공개 메소드

public getNamespaceMapFor ( integer $flags, string $name ) : FullyQualifiedGlobalStructuralElement
$flags integer
$name string
리턴 Phan\Language\FQSEN\FullyQualifiedGlobalStructuralElement The namespace mapped name for the given flags and name

getScope() 공개 메소드

public getScope ( ) : Scope
리턴 Scope An object describing the contents of the current scope.

getScope() 공개 메소드

public getScope ( ) : Scope
리턴 Scope An object describing the contents of the current scope.

hasNamespaceMapFor() 공개 메소드

public hasNamespaceMapFor ( integer $flags, string $name ) : boolean
$flags integer
$name string
리턴 boolean True if we have a mapped NS for the given named element

hasSuppressIssue() 공개 메소드

public hasSuppressIssue ( CodeBase $code_base, string $issue_name ) : boolean
$code_base Phan\CodeBase The code base from which to retrieve a possible TypedElement that contains an issue suppression list
$issue_name string
리턴 boolean True if issues with the given name are suppressed within this context.

isInClassScope() 공개 메소드

public isInClassScope ( ) : boolean
리턴 boolean True if this context is currently within a class scope, else false.

isInElementScope() 공개 메소드

public isInElementScope ( ) : boolean
리턴 boolean True if we're within the scope of a class, method, function or closure. False if we're in the global scope

isInFunctionLikeScope() 공개 메소드

public isInFunctionLikeScope ( ) : boolean
리턴 boolean True if this context is currently within a method, function or closure scope.

isInGlobalScope() 공개 메소드

public isInGlobalScope ( ) : boolean
리턴 boolean True if we're in the global scope (not in a class, method, function, closure).

isInMethodScope() 공개 메소드

public isInMethodScope ( ) : boolean
리턴 boolean True if this context is currently within a method.

setScope() 공개 메소드

Set the scope on the context
public setScope ( Scope $scope ) : void
$scope Scope
리턴 void

setScope() 공개 메소드

Set the scope on the context
public setScope ( Scope $scope ) : void
$scope Scope
리턴 void

withNamespace() 공개 메소드

*
public withNamespace ( string $namespace ) : Context
$namespace string The namespace of the file
리턴 Context A clone of this context with the given value is returned

withNamespaceMap() 공개 메소드

public withNamespaceMap ( integer $flags, string $alias, FullyQualifiedGlobalStructuralElement $target ) : Context
$flags integer
$alias string
$target Phan\Language\FQSEN\FullyQualifiedGlobalStructuralElement
리턴 Context This context with the given value is returned

withScope() 공개 메소드

public withScope ( Scope $scope ) : Context
$scope Scope
리턴 Context A new context with the given scope

withScope() 공개 메소드

public withScope ( Scope $scope ) : Context
$scope Scope
리턴 Context A new context with the given scope

withScopeVariable() 공개 메소드

public withScopeVariable ( Variable $variable ) : Context
$variable Phan\Language\Element\Variable A variable to add to the scope for the new context
리턴 Context A new context based on this with a variable as defined by the parameters in scope

withStrictTypes() 공개 메소드

public withStrictTypes ( integer $strict_types ) : Context
$strict_types integer The strict_type setting for the file
리턴 Context This context with the given value is returned

프로퍼티 상세

$strict_types 보호되어 있는 프로퍼티

strict_types setting for the file
protected int $strict_types
리턴 integer