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 getJS() { $js = parent::getJS(); $firstOpenParens = strpos($js, "("); $lastCloseParens = strrpos($js, ")"); if ($firstOpenParens !== FALSE) { $js = substr_replace($js, '{', $firstOpenParens, 1); } if ($lastCloseParens !== FALSE) { $js = substr_replace($js, '}', $lastCloseParens, 1); } if ($this->parentScope instanceof ClassScope) { $this->parentScope->setVariableString($this->variableName, $js); return "/* " . $this->variableName . " */"; } return $js; }
function getJS() { return $this->rootScope->getJS(); }