Property | Type | Description | |
---|---|---|---|
$strict_types | integer | strict_types setting for the file |
Method | Description | |
---|---|---|
__construct ( ) | Create a new context | |
addGlobalScopeVariable ( |
||
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. | |
getClassFQSEN ( ) : |
||
getClassInScope ( |
||
getElementInScope ( |
||
getFunctionLikeFQSEN ( ) | * | |
getFunctionLikeInScope ( |
||
getIsStrictTypes ( ) : boolean | ||
getNamespace ( ) : string | ||
getNamespaceMapFor ( integer $flags, string $name ) : |
||
getScope ( ) : Scope | ||
getScope ( ) : |
||
hasNamespaceMapFor ( integer $flags, string $name ) : boolean | ||
hasSuppressIssue ( |
||
isInClassScope ( ) : boolean | ||
isInElementScope ( ) : boolean | ||
isInFunctionLikeScope ( ) : boolean | ||
isInGlobalScope ( ) : boolean | ||
isInMethodScope ( ) : boolean | ||
setScope ( Scope $scope ) : void | Set the scope on the context | |
setScope ( |
Set the scope on the context | |
withNamespace ( string $namespace ) : |
* | |
withNamespaceMap ( integer $flags, string $alias, |
||
withScope ( Scope $scope ) : |
||
withScope ( |
||
withScopeVariable ( |
||
withStrictTypes ( integer $strict_types ) : |
public addGlobalScopeVariable ( |
||
$variable | A variable to add to the scope for the new context | |
return | void |
public addScopeVariable ( |
||
$variable | A variable to inject into this context | |
return | null |
public getClassFQSEN ( ) : |
||
return | A fully-qualified structural element name describing the current class in scope. |
public getClassInScope ( |
||
$code_base | The global code base holding all state | |
return | Get the class in this scope, or fail real hard |
public getElementInScope ( |
||
$code_base | The code base from which to retrieve the TypedElement | |
return | 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. |
public getFunctionLikeInScope ( |
||
$code_base | The global code base holding all state | |
return | Phan\Language\Element\FunctionInterface | Get the method in this scope or fail real hard |
public getIsStrictTypes ( ) : boolean | ||
return | boolean | True if strict_types is set to 1 in this context. |
public getNamespace ( ) : string | ||
return | string | The namespace of the file |
public getNamespaceMapFor ( integer $flags, string $name ) : |
||
$flags | integer | |
$name | string | |
return | The namespace mapped name for the given flags and name |
public getScope ( ) : Scope | ||
return | Scope | An object describing the contents of the current scope. |
public getScope ( ) : |
||
return | An object describing the contents of the current scope. |
public hasSuppressIssue ( |
||
$code_base | The code base from which to retrieve a possible TypedElement that contains an issue suppression list | |
$issue_name | string | |
return | boolean | True if issues with the given name are suppressed within this context. |
public isInClassScope ( ) : boolean | ||
return | boolean | True if this context is currently within a class scope, else false. |
public isInElementScope ( ) : boolean | ||
return | boolean | True if we're within the scope of a class, method, function or closure. False if we're in the global scope |
public isInFunctionLikeScope ( ) : boolean | ||
return | boolean | True if this context is currently within a method, function or closure scope. |
public isInGlobalScope ( ) : boolean | ||
return | boolean | True if we're in the global scope (not in a class, method, function, closure). |
public isInMethodScope ( ) : boolean | ||
return | boolean | True if this context is currently within a method. |
public withNamespace ( string $namespace ) : |
||
$namespace | string | The namespace of the file |
return | A clone of this context with the given value is returned |
public withNamespaceMap ( integer $flags, string $alias, |
||
$flags | integer | |
$alias | string | |
$target | ||
return | This context with the given value is returned |
public withScope ( Scope $scope ) : |
||
$scope | Scope | |
return | A new context with the given scope |
public withScope ( |
||
$scope | ||
return | A new context with the given scope |
public withScopeVariable ( |
||
$variable | A variable to add to the scope for the new context | |
return | A new context based on this with a variable as defined by the parameters in scope |
public withStrictTypes ( integer $strict_types ) : |
||
$strict_types | integer | The strict_type setting for the file |
return | This context with the given value is returned |
protected int $strict_types | ||
return | integer |