From fe5cbde27a571db160694ebb0eb9be02af57dd5a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 5 Sep 2009 00:36:55 +0000 Subject: [PATCH] endElement() does now no longer ignore sub nodes, debug lines commented out --- .../template/menu/class_MenuTemplateEngine.php | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) 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 -- 2.39.5