function findAncestorScopeByType($type) { if ($this->parentScope == null) { return null; } if ($this->parentScope->getType() == $type) { return $this->parentScope; } return $this->parentScope->findAncestorScopeByType($type); }
function getJS() { $js = ""; $jsRaw = parent::getJS(); $search = array(); $replace = array(); foreach ($this->exceptionNames as $exceptionName) { $search[] = "" . $exceptionName . ".getMessage()"; $replace[] = "" . $exceptionName . ".message"; } $jsRaw = str_replace($search, $replace, $jsRaw); $js .= $jsRaw; return $js; }
function startArrayScope($scopeName, $startedBySquareBracket) { $classScope = false; if ($this->currentScope instanceof ClassScope) { $classScope = $this->currentScope; } $this->pushScope(CODE_SCOPE_ARRAY, $scopeName); $this->changeToState(CONVERTER_STATE_DEFAULT); if ($classScope != false) { $this->currentScope->setVariableName($classScope->currentVariableName); } if ($startedBySquareBracket == true) { $this->currentScope->incrementSquareBracketCount(); } $this->currentScope->startedBySquareBracket = $startedBySquareBracket; }
/** * @param $variableName * @param $variableFlag * @return bool */ function addScopedVariable($variableName, $variableFlag) { $result = parent::addScopedVariable($variableName, $variableFlag); $this->setBeforeVariable(FALSE); return $result; }
function postStateMagic($name, $value) { parent::postStateMagic($name, $value); }