$fb_["fuseQ"][$fb_["pointer"]]["phase"] = $fb_["phase"]; } } 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) {
fb_.indentLevel = fb_.indentLevel - 1; fb_.parsedfile = fb_.parsedfile & fb_.CRLF & repeatString(fb_.indentBlock, min(fb_.maxIndentLevel, fb_.indentLevel)) & '<cfelse>'; fb_.indentLevel = fb_.indentLevel + 1; */ fb_appendSegment('__cfthrow(array("type"=>"fusebox.failedAssertion", "message"=>"' . $fb_["fuseQ"][$fb_["i"]]["xmlAttributes"]["message"] . '", "detail"=>"The assertion, ' . str_replace("\$", "\\\$", $fb_["fuseQ"][$fb_["i"]]["xmlAttributes"]["expression"]) . ', failed at run-time in fuseaction ' . $fb_["fuseQ"][$fb_["i"]]["circuit"] . '.' . $fb_["fuseQ"][$fb_["i"]]["fuseaction"] . '."));'); /* fb_.indentLevel = fb_.indentLevel - 1; */ fb_appendSegment('}'); fb_appendSegment('</assertion> *' . '/'); fb_appendNewLine(); $fb_["hasAssertions"] = true; break; default: if ($application["fusebox"]["allowLexicon"] && __ListLen($fb_["fuseQ"][$fb_["i"]]["xmlName"], '.') > 1) { $fb_["lexicon"] = __ListFirst($fb_["fuseQ"][$fb_["i"]]["xmlName"], '.'); $fb_["lexiconVerb"] = __ListRest($fb_["fuseQ"][$fb_["i"]]["xmlName"], '.'); $fb_["verbInfo"] = array(); $fb_["verbInfo"]["lexicon"] = $fb_["lexicon"]; $fb_["verbInfo"]["verb"] = $fb_["lexiconVerb"]; $fb_["verbInfo"]["attributes"] = $fb_["fuseQ"][$fb_["i"]]["xmlAttributes"]; if (array_key_exists($fb_["lexicon"], $application["fusebox"]["lexicons"])) { if (file_exists($application["fusebox"]["approotdirectory"] . $application["fusebox"]["lexiconPath"] . $application["fusebox"]["lexicons"][$fb_["lexicon"]]["path"] . $fb_["lexiconVerb"] . '.' . $application["fusebox"]["scriptFileDelimiter"])) { include ereg_replace("[\\/]+", "/", $application["fusebox"]["WebRootToAppRootPath"] . $application["fusebox"]["lexiconPath"] . $application["fusebox"]["lexicons"][$fb_["lexicon"]]["path"] . $fb_["lexiconVerb"] . '.' . $application["fusebox"]["scriptFileDelimiter"]); } else { if (!$application["fusebox"]["ignoreBadGrammar"]) { __cfthrow(array("type" => "fusebox.badGrammar", "message" => "Bad Grammar verb in circuit file", "detail" => "The implementation file for the '" . $fb_["lexiconVerb"] . "' verb from the '" . $fb_["lexicon"] . "' custom lexicon could not be found. It is used in the '" . $fb_["fuseQ"][$fb_["i"]]["circuit"] . "' circuit.")); } else { // do nothing } }