}
 }
 for ($fb_["pointer"] = 0; $fb_["pointer"] < count($fb_["fuseQ"]); $fb_["pointer"]++) {
     $fb_["doMore"] = false;
     switch (strtolower($fb_["fuseQ"][$fb_["pointer"]]["xmlName"])) {
         case "do":
             $fb_["doMore"] = true;
             $fb_["aFuseaction"] = $fb_["fuseQ"][$fb_["pointer"]]["xmlAttributes"]["action"];
             if (__ListLen($fb_["aFuseaction"], '.') == 1) {
                 // assume no circuit means current circuit
                 $myFusebox["thisCircuit"] = $fb_["fuseQ"][$fb_["pointer"]]["circuit"];
                 $myFusebox["thisFuseaction"] = __ListFirst($fb_["aFuseaction"], '.');
             } else {
                 // parse new FA
                 $myFusebox["thisCircuit"] = __ListFirst($fb_["aFuseaction"], '.');
                 $myFusebox["thisFuseaction"] = __ListLast($fb_["aFuseaction"], '.');
             }
             // catch any last minute problems with non-existant circuits
             if (!isset($application["fusebox"]["circuits"][$myFusebox["thisCircuit"]])) {
                 die("You specified a Circuit of " . $myFusebox["thisCircuit"] . " which is not defined.");
             }
             // catch any last minute problems with non-existant or overloaded fuseactions
             //<cfset fb_.xnAccess = xmlSearch(application.fusebox.circuits[myFusebox.thisCircuit].xml, "//circuit/fuseaction[@name='#fuseaction#']")>
             $fb_["fcount"] = 0;
             foreach (array_keys($application["fusebox"]["circuits"][$myFusebox["thisCircuit"]]["fuseactions"]) as $fb_["tempfa"]) {
                 if ($fb_["tempfa"] == $myFusebox["thisFuseaction"]) {
                     $fb_["fcount"]++;
                 }
             }
             if ($fb_["fcount"] == 0) {
                 die("You referenced a fuseaction, " . $myFusebox["thisFuseaction"] . ", which does not exist in the circuit " . $myFusebox["thisCircuit"] . ".");
Exemplo n.º 2
0
     $fb_["errorLevel"]--;
     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"]++;
     }