Scope

io.joern.php2cpg.utils.Scope
class Scope(summary: Map[String, Seq[SymbolSummary]])(implicit nextClosureName: () => String) extends Scope[String, NewNode, PhpScopeElement]

Attributes

Graph
Supertypes
class Scope[String, NewNode, PhpScopeElement]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def addAnonymousMethod(methodAst: Ast): Unit
def addConstOrStaticInitToScope(ast: Ast): Unit
def addFieldInitToScope(ast: Ast): Unit
override def addToScope(identifier: String, variable: NewNode): PhpScopeElement

Attributes

Definition Classes
Scope
def getConstAndStaticInits: List[Ast]
def getEnclosingNamespaceNames: List[String]
def getEnclosingTypeDeclTypeFullName: Option[String]
def getEnclosingTypeDeclTypeName: Option[String]
def getFieldInits: List[Ast]
def getNewClassTmp: String
def getNewVarTmp(varPrefix: String): String
def getScopedClosureName: String
override def popScope(): Option[PhpScopeElement]

Attributes

Definition Classes
Scope
def pushNewScope(scopeNode: NewNode): Unit
def resolveIdentifier(symbol: String): Option[SymbolSummary]

Attempts to resolve a simple symbol.

Attempts to resolve a simple symbol.

Note: This will be extended to notify the caller if this identifier is instead a local variable.

Attributes

def surroundingAstLabel: Option[String]
def surroundingScopeFullName: Option[String]
def useImport(imports: Seq[NewImport]): Unit

Declares imports to load into this scope.

Declares imports to load into this scope.

Value parameters

imports

the import nodes generated from parsing PhpUseStmt and PhpGroupUseStmt nodes.

Attributes

Inherited methods

def isEmpty: Boolean

Attributes

Inherited from:
Scope
def lookupVariable(identifier: String): Option[NewNode]

Attributes

Inherited from:
Scope
def pushNewScope(scopeNode: PhpScopeElement): Unit

Attributes

Inherited from:
Scope
def size: Int

Attributes

Inherited from:
Scope