示例#1
0
     if ($fb_["indentLevel"] > 0) {
         fb_decreaseIndent();
     }
     fb_appendLine("} while ( false );");
     fb_appendLine("if ( \$php_errormsg ) {");
     fb_increaseIndent();
     break;
 case "endCatch":
     fb_decreaseIndent();
     fb_appendLine("}");
     break;
 case "errorHandler":
 case "exceptionHandler":
     $fb_["template"] = $fb_["fuseQ"][$fb_["i"]]["plugin"]["template"];
     $fb_["templateDelimiter"] = __ListLast($fb_["template"], '.');
     if (!(__ListFindNoCase($application["fusebox"]["maskedFileDelimiters"], $fb_["templateDelimiter"], ',') || __ListFindNoCase($application["fusebox"]["maskedFileDelimiters"], '*', ','))) {
         $fb_["template"] .= "." . $application["fusebox"]["scriptFileDelimiter"];
     }
     $fb_["handlerfile"] = $application["fusebox"]["rootdirectory"] . $application["fusebox"]["osdelimiter"] . $fb_["fuseQ"][$fb_["i"]]["plugin"]["path"] . $fb_["template"];
     $fp = fopen($fb_["handlerfile"], "r");
     $fb_["handlervariable"] = fread($fp, filesize($fb_["handlerfile"]));
     fclose($fp);
     $fb_["handlervariable"] = str_replace($fb_["CRLF"], $fb_["CRLF"] . str_repeat($fb_["indentBlock"], min($fb_["maxIndentLevel"], $fb_["indentLevel"])), $fb_["handlervariable"]);
     fb_appendLine($fb_["handlervariable"]);
     break;
 case "beginExceptionHandler":
     $fb_["errorLevel"]++;
     if ($fb_["errorLevel"] == 0) {
         $fb_["errorLevel"]++;
     }
     fb_appendLine("do {");
                     }
                 }
                 closedir($fb_["dirlist"]);
             }
             if (!$fb_["keepGoing"]) {
                 break;
             }
             $fb_["scannedDirectories"] .= chr(5) . $fb_["path"];
         }
     }
 }
 // see if the parse file is older than any lexicon file
 $fb_["scannedDirectories"] = "";
 foreach (array_keys($application["fusebox"]["lexicons"]) as $fb_["lex"]) {
     $fb_["path"] = $application["fusebox"]["lexiconPath"] . $application["fusebox"]["lexicons"][$fb_["lex"]]["path"];
     if (__ListFindNoCase($fb_["scannedDirectories"], $fb_["path"], chr(5)) == 0) {
         if ($fb_["dirlist"] = opendir(dirname($application["fusebox"]["approotdirectory"] . $fb_["path"]))) {
             while (false !== ($file = readdir($fb_["dirlist"]))) {
                 if ($file != "." && $file != "..") {
                     $fb_["completepath"] = realpath($file);
                     if (is_file($fb_["completepath"]) && filemtime($fb_["completepath"]) > $fb_["parseFileTimestamp"]) {
                         $fb_["errortype"] = "fusebox.forceParseException.lexiconIsNewer";
                         $fb_["keepGoing"] = false;
                     }
                 }
             }
             closedir($fb_["dirlist"]);
         }
         if (!$fb_["keepGoing"]) {
             break;
         }