コード例 #1
0
 function getScopeName()
 {
     $parentClassScope = $this->currentScope->findAncestorScopeByType(CODE_SCOPE_CLASS);
     if ($parentClassScope != null) {
         return "this." . $this->currentScope->getName();
     }
     return $this->currentScope->getName();
 }
コード例 #2
0
ファイル: CodeScope.php プロジェクト: microcosmx/experiments
 function findAncestorScopeByType($type)
 {
     if ($this->parentScope == null) {
         return null;
     }
     if ($this->parentScope->getType() == $type) {
         return $this->parentScope;
     }
     return $this->parentScope->findAncestorScopeByType($type);
 }