From: Roland Häder Date: Sat, 5 Sep 2009 00:36:55 +0000 (+0000) Subject: endElement() does now no longer ignore sub nodes, debug lines commented out X-Git-Url: https://git.mxchange.org/?p=core.git;a=commitdiff_plain;h=fe5cbde27a571db160694ebb0eb9be02af57dd5a endElement() does now no longer ignore sub nodes, debug lines commented out --- diff --git a/inc/classes/main/template/menu/class_MenuTemplateEngine.php b/inc/classes/main/template/menu/class_MenuTemplateEngine.php index 0dbd2cb8..32c92ea1 100644 --- a/inc/classes/main/template/menu/class_MenuTemplateEngine.php +++ b/inc/classes/main/template/menu/class_MenuTemplateEngine.php @@ -185,7 +185,7 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla $element = strtolower($element); // Is the element a main node? - /* DEBUG: */ echo "START: >".$element."<
\n"; + //* DEBUG: */ echo "START: >".$element."<
\n"; if (in_array($element, $this->getMainNodes())) { // Okay, main node found! $methodName = 'startMenu' . $this->convertToClassName($element); @@ -201,7 +201,7 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla } // Call method - /* DEBUG: */ echo "call: ".$methodName."
\n"; + //* DEBUG: */ echo "call: ".$methodName."
\n"; call_user_func_array(array($this, $methodName), $attributes); } @@ -218,20 +218,17 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla $nodeName = strtolower($nodeName); // Does this match with current main node? - /* DEBUG: */ echo "END: >".$nodeName."<
\n"; + //* DEBUG: */ echo "END: >".$nodeName."<
\n"; if (($nodeName != $this->getCurrMainNode()) && (in_array($nodeName, $this->getMainNodes()))) { // Did not match! throw new XmlNodeMismatchException (array($this, $nodeName, $this->getCurrMainNode()), XmlParser::EXCEPTION_XML_NODE_MISMATCH); - } elseif (in_array($nodeName, $this->getSubNodes())) { - // Silently ignore sub nodes - return; - } + } // END - if // Construct method name $methodName = 'finish' . $this->convertToClassName($nodeName); // Call the corresponding method - /* DEBUG: */ echo "call: ".$methodName."
\n"; + //* DEBUG: */ echo "call: ".$methodName."
\n"; call_user_func_array(array($this->getMenuInstance(), $methodName), array()); } @@ -241,7 +238,7 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla * @param $resource XML parser resource (currently ignored) * @param $characters Characters to handle * @return void - * @todo Find something usefull with this! + * @todo Find something useful with this! */ public function characterHandler ($resource, $characters) { // Trim all spaces away