Handling of nodes fixed
authorRoland Häder <roland@mxchange.org>
Mon, 9 Nov 2009 02:16:12 +0000 (02:16 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 9 Nov 2009 02:16:12 +0000 (02:16 +0000)
inc/classes/main/template/menu/class_MenuTemplateEngine.php

index 0c4f317ad3760cb3ae95e4135e679ddb201505cb..2cfb5eb44d90090dad862aafca0831d8363e2566 100644 (file)
@@ -27,19 +27,19 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
         */
        private $mainNodes = array(
                'block-list',
-               'header',
-               'entry-list',
-               'footer',
        );
 
        /**
         * Sub nodes in the XML tree
         */
        private $subNodes = array(
-               'block',
+               'entry-list',
+               'entry',
                'entries-content',
+               'header',
+               'footer',
+               'block',
                'title',
-               'entry',
                'anchor',
                'design',
                'text',
@@ -206,13 +206,13 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
                //* DEBUG: */ echo "START: &gt;".$element."&lt;<br />\n";
                if (in_array($element, $this->getMainNodes())) {
                        // Okay, main node found!
-                       $methodName = 'startMenu' . $this->convertToClassName($element);
+                       $methodName = 'start' . $this->convertToClassName($element);
 
                        // Set it
                        $this->setCurrMainNode($element);
                } elseif (in_array($element, $this->getSubNodes())) {
                        // Sub node found
-                       $methodName = 'startMenu' . $this->convertToClassName($element);
+                       $methodName = 'start' . $this->convertToClassName($element);
                } elseif ($element != 'menu') {
                        // Invalid node name found
                        throw new InvalidXmlNodeException(array($this, $element, $attributes), XmlParser::EXCEPTION_XML_NODE_UNKNOWN);
@@ -342,7 +342,7 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
         * @param       $templateDepency        A template to load to satisfy depencies
         * @return      void
         */
-       private function startMenuEntries ($templateDepency = '') {
+       private function startEntryList ($templateDepency = '') {
                // Handle the depency template
                $this->handleTemplateDepency('entries', $templateDepency);
 
@@ -361,7 +361,7 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
         *
         * @return      void
         */
-       private function finishEntries () {
+       private function finishEntryList () {
                // Load the header template for this page
                $this->getTemplateInstance()->loadCodeTemplate('menu_entries_end');
 
@@ -377,7 +377,7 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
         *
         * @return      void
         */
-       private function startMenuHeader () {
+       private function startHeader () {
                // Do we have a template instance?
                if (is_null($this->getTemplateInstance())) {
                        // Init template instance for underlaying web templates
@@ -418,7 +418,7 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
         *
         * @return      void
         */
-       private function startMenuFooter () {
+       private function startFooter () {
                // Do we have a template instance?
                if (is_null($this->getTemplateInstance())) {
                        // Init template instance for underlaying web templates
@@ -461,7 +461,7 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
         * @param       $class  The title to add to the menu
         * @return      void
         */
-       private function startMenuTitle ($id, $class) {
+       private function startTitle ($id, $class) {
                // Set id as current
                $this->curr['id'] = $id;
 
@@ -496,7 +496,7 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
         *
         * @return      void
         */
-       private function startMenuText () {
+       private function startText () {
                // Do we have a template instance?
                if (is_null($this->getTemplateInstance())) {
                        // Init template instance for underlaying web templates
@@ -538,7 +538,7 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
         * @param       $id             Id of the menu
         * @return      void
         */
-       private function startMenuEntry ($id) {
+       private function startEntry ($id) {
                // Set id as current
                $this->curr['entry_id'] = $id;
 
@@ -575,7 +575,7 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
         * @param       $title  Link title of the anchor
         * @return      void
         */
-       private function startMenuAnchor ($id, $link, $title) {
+       private function startAnchor ($id, $link, $title) {
                $this->partialStub('id='.$id.',link='.$link.',title='.$title);
        }