Stacker classes/interface/exceptions (FiFoStacker is not completed, will follow soon...
authorRoland Häder <roland@mxchange.org>
Mon, 7 Dec 2009 21:37:13 +0000 (21:37 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 7 Dec 2009 21:37:13 +0000 (21:37 +0000)
62 files changed:
.gitattributes
inc/classes/exceptions/stacker/.htaccess [new file with mode: 0644]
inc/classes/exceptions/stacker/class_AlreadyInitializedStackerException.php [new file with mode: 0644]
inc/classes/exceptions/stacker/class_EmptyStackerException.php [new file with mode: 0644]
inc/classes/exceptions/stacker/class_FullStackerException.php [new file with mode: 0644]
inc/classes/exceptions/stacker/class_NoStackerException.php [new file with mode: 0644]
inc/classes/interfaces/actions/class_PerformableAction.php
inc/classes/interfaces/actions/commands/class_Commandable.php
inc/classes/interfaces/auth/class_Authorizeable.php
inc/classes/interfaces/captcha/class_SolveableCaptcha.php
inc/classes/interfaces/class_
inc/classes/interfaces/class_FrameworkInterface.php
inc/classes/interfaces/controller/class_Controller.php
inc/classes/interfaces/criteria/class_Criteria.php
inc/classes/interfaces/criteria/extended/class_LocalSearchCriteria.php
inc/classes/interfaces/criteria/extended/class_LocalUpdateCriteria.php
inc/classes/interfaces/database/class_Updateable.php
inc/classes/interfaces/database/wrapper/class_BookablePointsWrapper.php
inc/classes/interfaces/database/wrapper/class_ManageableAccountWrapper.php
inc/classes/interfaces/debug/class_Debugger.php
inc/classes/interfaces/discovery/class_Discoverable.php
inc/classes/interfaces/filter/class_Filterable.php
inc/classes/interfaces/helper/class_HelpableLogin.php
inc/classes/interfaces/helper/class_HelpableTemplate.php
inc/classes/interfaces/io/class_Streamable.php
inc/classes/interfaces/io/file/class_FileInputStreamer.php
inc/classes/interfaces/io/file/class_FileOutputStreamer.php
inc/classes/interfaces/io/output/class_OutputStreamer.php
inc/classes/interfaces/language/class_ManageableLanguage.php
inc/classes/interfaces/login/class_LoginableUser.php
inc/classes/interfaces/mailer/class_DeliverableMail.php
inc/classes/interfaces/parser/class_Parseable.php
inc/classes/interfaces/points/class_BookablePoints.php
inc/classes/interfaces/reader/class_ReadableNews.php
inc/classes/interfaces/registration/class_UserRegister.php
inc/classes/interfaces/request/class_Requestable.php
inc/classes/interfaces/resolver/actions/class_ActionResolver.php
inc/classes/interfaces/resolver/class_Resolver.php
inc/classes/interfaces/resolver/commands/class_CommandResolver.php
inc/classes/interfaces/resolver/controller/class_ControllerResolver.php
inc/classes/interfaces/resolver/state/class_StateResolver.php
inc/classes/interfaces/response/class_Responseable.php
inc/classes/interfaces/stacker/.htaccess [new file with mode: 0644]
inc/classes/interfaces/stacker/class_Stackable.php [new file with mode: 0644]
inc/classes/interfaces/state/class_Stateable.php
inc/classes/interfaces/streams/class_Streamable.php
inc/classes/interfaces/streams/crypto/class_EncryptableStream.php
inc/classes/interfaces/template/class_CompileableTemplate.php
inc/classes/interfaces/user/class_ManageableAccount.php
inc/classes/interfaces/user/extended/class_ManageableGuest.php
inc/classes/interfaces/user/extended/class_ManageableMember.php
inc/classes/main/class_
inc/classes/main/class_BaseFrameworkSystem.php
inc/classes/main/stacker/.htaccess [new file with mode: 0644]
inc/classes/main/stacker/class_ [new file with mode: 0644]
inc/classes/main/stacker/class_BaseStacker.php [new file with mode: 0644]
inc/classes/main/stacker/fifo/.htaccess [new file with mode: 0644]
inc/classes/main/stacker/fifo/class_FiFoStacker.php [new file with mode: 0644]
inc/classes/main/stacker/filo/.htaccess [new file with mode: 0644]
inc/classes/main/stacker/filo/class_FiLoStacker.php [new file with mode: 0644]
inc/classes/main/template/menu/class_MenuTemplateEngine.php
inc/config.php

index 0185c48..1c4f05a 100644 (file)
@@ -94,6 +94,11 @@ inc/classes/exceptions/result/class_InvalidDatabaseResultException.php -text
 inc/classes/exceptions/result/class_ResultUpdateException.php -text
 inc/classes/exceptions/socket/.htaccess -text
 inc/classes/exceptions/socket/class_InvalidSocketException.php -text
+inc/classes/exceptions/stacker/.htaccess -text
+inc/classes/exceptions/stacker/class_AlreadyInitializedStackerException.php -text
+inc/classes/exceptions/stacker/class_EmptyStackerException.php -text
+inc/classes/exceptions/stacker/class_FullStackerException.php -text
+inc/classes/exceptions/stacker/class_NoStackerException.php -text
 inc/classes/exceptions/state/.htaccess -text
 inc/classes/exceptions/state/class_InvalidStateException.php -text
 inc/classes/exceptions/state/class_InvalidStateInstanceException.php -text
@@ -202,6 +207,8 @@ inc/classes/interfaces/response/class_Responseable.php -text
 inc/classes/interfaces/result/.htaccess -text
 inc/classes/interfaces/result/class_SearchableResult.php -text
 inc/classes/interfaces/result/class_UpdateableResult.php -text
+inc/classes/interfaces/stacker/.htaccess -text
+inc/classes/interfaces/stacker/class_Stackable.php -text
 inc/classes/interfaces/state/.htaccess -text
 inc/classes/interfaces/state/class_Stateable.php -text
 inc/classes/interfaces/streams/.htaccess -text
@@ -463,6 +470,13 @@ inc/classes/main/result/.htaccess -text
 inc/classes/main/result/class_DatabaseResult.php -text
 inc/classes/main/rng/.htaccess -text
 inc/classes/main/rng/class_RandomNumberGenerator.php -text
+inc/classes/main/stacker/.htaccess -text
+inc/classes/main/stacker/class_ -text
+inc/classes/main/stacker/class_BaseStacker.php -text
+inc/classes/main/stacker/fifo/.htaccess -text
+inc/classes/main/stacker/fifo/class_FiFoStacker.php -text
+inc/classes/main/stacker/filo/.htaccess -text
+inc/classes/main/stacker/filo/class_FiLoStacker.php -text
 inc/classes/main/streams/.htaccess -text
 inc/classes/main/streams/class_ -text
 inc/classes/main/streams/class_BaseStream.php -text
diff --git a/inc/classes/exceptions/stacker/.htaccess b/inc/classes/exceptions/stacker/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/inc/classes/exceptions/stacker/class_AlreadyInitializedStackerException.php b/inc/classes/exceptions/stacker/class_AlreadyInitializedStackerException.php
new file mode 100644 (file)
index 0000000..2b0cd79
--- /dev/null
@@ -0,0 +1,46 @@
+<?php
+/**
+ * Thrown if a stacker is already initialized
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class AlreadyInitializedStackerException extends FrameworkException {
+       /**
+        * The super constructor for all exceptions
+        *
+        * @param               $messageArray   Error message array
+        * @param               $code                   Error code
+        * @return      void
+        */
+       public function __construct(array $messageArray, $code) {
+               // Construct message
+               $message = sprintf("[%s:%d] Stacker %s already initialized.",
+                       $messageArray[0]->__toString(),
+                       $this->getLine(0),
+                       $messageArray[1]
+               );
+
+               // Call parent exception constructor
+               parent::__construct($message, $code);
+       }
+}
+
+// [EOF]
+?>
diff --git a/inc/classes/exceptions/stacker/class_EmptyStackerException.php b/inc/classes/exceptions/stacker/class_EmptyStackerException.php
new file mode 100644 (file)
index 0000000..429025b
--- /dev/null
@@ -0,0 +1,46 @@
+<?php
+/**
+ * Thrown if a stacker is empty
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class EmptyStackerException extends FrameworkException {
+       /**
+        * The super constructor for all exceptions
+        *
+        * @param               $messageArray   Error message array
+        * @param               $code                   Error code
+        * @return      void
+        */
+       public function __construct(array $messageArray, $code) {
+               // Construct message
+               $message = sprintf("[%s:%d] Stacker %s is empty.",
+                       $messageArray[0]->__toString(),
+                       $this->getLine(0),
+                       $messageArray[1]
+               );
+
+               // Call parent exception constructor
+               parent::__construct($message, $code);
+       }
+}
+
+// [EOF]
+?>
diff --git a/inc/classes/exceptions/stacker/class_FullStackerException.php b/inc/classes/exceptions/stacker/class_FullStackerException.php
new file mode 100644 (file)
index 0000000..dbb23e8
--- /dev/null
@@ -0,0 +1,46 @@
+<?php
+/**
+ * Thrown if a stacker is full
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class FullStackerException extends FrameworkException {
+       /**
+        * The super constructor for all exceptions
+        *
+        * @param               $messageArray   Error message array
+        * @param               $code                   Error code
+        * @return      void
+        */
+       public function __construct(array $messageArray, $code) {
+               // Construct message
+               $message = sprintf("[%s:%d] Stacker %s is full.",
+                       $messageArray[0]->__toString(),
+                       $this->getLine(0),
+                       $messageArray[1]
+               );
+
+               // Call parent exception constructor
+               parent::__construct($message, $code);
+       }
+}
+
+// [EOF]
+?>
diff --git a/inc/classes/exceptions/stacker/class_NoStackerException.php b/inc/classes/exceptions/stacker/class_NoStackerException.php
new file mode 100644 (file)
index 0000000..108c4fe
--- /dev/null
@@ -0,0 +1,46 @@
+<?php
+/**
+ * Thrown if a stacker is empty
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class NoStackerException extends FrameworkException {
+       /**
+        * The super constructor for all exceptions
+        *
+        * @param               $messageArray   Error message array
+        * @param               $code                   Error code
+        * @return      void
+        */
+       public function __construct(array $messageArray, $code) {
+               // Construct message
+               $message = sprintf("[%s:%d] Stacker %s is not intialized.",
+                       $messageArray[0]->__toString(),
+                       $this->getLine(0),
+                       $messageArray[1]
+               );
+
+               // Call parent exception constructor
+               parent::__construct($message, $code);
+       }
+}
+
+// [EOF]
+?>
index d16554f..21c2928 100644 (file)
@@ -32,5 +32,5 @@ interface PerformableAction extends FrameworkInterface {
        function execute (Requestable $requestInstance, Responseable $responseInstance);
 }
 
-//
+// [EOF]
 ?>
index a1aa3ff..c4255ac 100644 (file)
@@ -32,5 +32,5 @@ interface Commandable extends PerformableAction {
        function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance);
 }
 
-//
+// [EOF]
 ?>
index 3472e9e..f23691a 100644 (file)
@@ -37,5 +37,5 @@ interface Authorizeable extends FrameworkInterface {
        function updateAuthData ();
 }
 
-//
+// [EOF]
 ?>
index d47f6dd..c9393e8 100644 (file)
@@ -37,5 +37,5 @@ interface SolveableCaptcha extends FrameworkInterface {
        function renderCode ();
 }
 
-//
+// [EOF]
 ?>
index 5b04acb..0736f56 100644 (file)
@@ -24,5 +24,5 @@
 interface ??? extends FrameworkInterface {
 }
 
-//
+// [EOF]
 ?>
index ea2df03..61d0982 100644 (file)
@@ -41,5 +41,5 @@ interface FrameworkInterface {
        function hashCode ();
 }
 
-//
+// [EOF]
 ?>
index 765a4db..fc48100 100644 (file)
@@ -32,5 +32,5 @@ interface Controller extends FrameworkInterface {
        function handleRequest (Requestable $requestInstance, Responseable $responseInstance);
 }
 
-//
+// [EOF]
 ?>
index 9cda4c4..2ba12f0 100644 (file)
@@ -41,5 +41,5 @@ interface Criteria extends FrameworkInterface {
        function addConfiguredCriteria ($criteriaKey, $configEntry);
 }
 
-//
+// [EOF]
 ?>
index 57e34f2..dd50e9a 100644 (file)
@@ -32,5 +32,5 @@ interface Updateable extends FrameworkInterface {
        function updateDatabaseField ($fieldName, $fieldValue);
 }
 
-//
+// [EOF]
 ?>
index 2d609eb..2d38466 100644 (file)
@@ -39,5 +39,5 @@ interface BookablePointsWrapper extends FrameworkInterface {
        function doUpdateByResult (UpdateableResult $resultInstance);
 }
 
-//
+// [EOF]
 ?>
index d55ca0d..7f443ba 100644 (file)
@@ -39,5 +39,5 @@ interface ManageableAccountWrapper extends FrameworkInterface {
        function doUpdateByResult (UpdateableResult $resultInstance);
 }
 
-//
+// [EOF]
 ?>
index 2cb5f56..7275a56 100644 (file)
@@ -31,5 +31,5 @@ interface Debugger extends FrameworkInterface {
        function outputStream ($output);
 }
 
-//
+// [EOF]
 ?>
index c886d5f..d7cde84 100644 (file)
@@ -39,5 +39,5 @@ interface Discoverable extends FrameworkInterface {
        function addResultsToHelper (HelpableTemplate $helperInstance);
 }
 
-//
+// [EOF]
 ?>
index 99019a2..0825c45 100644 (file)
@@ -32,5 +32,5 @@ interface Filterable extends FrameworkInterface {
        function execute (Requestable $requestInstance, Responseable $responseInstance);
 }
 
-//
+// [EOF]
 ?>
index 09c83c0..8a8b7a0 100644 (file)
@@ -32,5 +32,5 @@ interface HelpableLogin extends FrameworkInterface {
        function executeLogin (Responseable $responseInstance);
 }
 
-//
+// [EOF]
 ?>
index 57558d9..10a6ba3 100644 (file)
@@ -30,5 +30,5 @@ interface HelpableTemplate extends FrameworkInterface {
        function flushContent ();
 }
 
-//
+// [EOF]
 ?>
index 9f76f71..71ee8eb 100644 (file)
@@ -24,5 +24,5 @@
 interface Streamable extends FrameworkInterface {
 }
 
-//
+// [EOF]
 ?>
index fa75916..2878d72 100644 (file)
@@ -27,12 +27,11 @@ interface FileInputStreamer extends Streamable {
         *
         * @param       $fqfn   The file's FQFN we shall load
         * @return      $array  An array containing all read lines
-        * @throws      InvalidArrayCountException      If an array has not the
-        *                                                                      expected size
+        * @throws      InvalidArrayCountException      If an array has not the expected size
         * @throws      InvalidMD5ChecksumException     If two MD5 hashes did not match
         */
        function loadFileContents ($fqfn);
 }
 
-//
+// [EOF]
 ?>
index 161decf..21f7010 100644 (file)
@@ -27,12 +27,11 @@ interface FileOutputStreamer extends Streamable {
         * external servers.
         *
         * @param       $fileName       The local file's name including full path
-        * @param       $dataArray      Array containing the compressor's extension
-        *                                              and streamed data
+        * @param       $dataArray      Array containing the compressor's extension and streamed data
         * @return      void
         */
        function saveFile ($fileName, $dataArray);
 }
 
-//
+// [EOF]
 ?>
index 7fd9c0e..029bb3a 100644 (file)
@@ -30,5 +30,5 @@ interface OutputStreamer extends Streamable {
        function output ($outStream = false);
 }
 
-//
+// [EOF]
 ?>
index 950ca0a..385bf9d 100644 (file)
@@ -28,7 +28,7 @@ interface ManageableLanguage extends FrameworkInterface {
         * @return      void
         */
        function initLanguageStrings();
-} // END - class
+}
 
 // [EOF]
 ?>
index 10acedd..6f6bac1 100644 (file)
@@ -34,5 +34,5 @@ interface LoginableUser extends FrameworkInterface {
        function doLogin (Requestable $requestInstance, Responseable $responseInstance);
 }
 
-//
+// [EOF]
 ?>
index 814fb64..b50e77c 100644 (file)
@@ -52,5 +52,5 @@ interface DeliverableMail extends FrameworkInterface {
        function sendAdminNotification ();
 }
 
-//
+// [EOF]
 ?>
index 61416ff..57060e1 100644 (file)
@@ -32,5 +32,5 @@ interface Parseable extends FrameworkInterface {
        function parseXmlContent ($content);
 }
 
-//
+// [EOF]
 ?>
index ee9e114..73946e5 100644 (file)
@@ -47,5 +47,5 @@ interface BookablePoints extends FrameworkInterface {
        function addElementsToDataSet (StoreableCriteria $criteriaInstance);
 }
 
-//
+// [EOF]
 ?>
index 2058fbf..4791d8e 100644 (file)
@@ -30,5 +30,5 @@ interface ReadableNews extends FrameworkInterface {
        function initializeReader();
 }
 
-//
+// [EOF]
 ?>
index 33cfc72..3c57c6e 100644 (file)
@@ -72,5 +72,5 @@ interface UserRegister extends FrameworkInterface {
        function addElementsToDataSet (StoreableCriteria $criteriaInstance);
 }
 
-//
+// [EOF]
 ?>
index fef4e34..cda7f3e 100644 (file)
@@ -78,5 +78,5 @@ interface Requestable extends FrameworkInterface {
        function readCookie ($cookieName);
 }
 
-//
+// [EOF]
 ?>
index bbf58ec..befb434 100644 (file)
@@ -47,5 +47,5 @@ interface ActionResolver extends Resolver {
        function isActionValid ($actionName);
 }
 
-//
+// [EOF]
 ?>
index cb882c1..c919332 100644 (file)
@@ -41,5 +41,5 @@ interface StateResolver extends Resolver {
        function isStateValid ($stateName);
 }
 
-//
+// [EOF]
 ?>
index 0a7850c..25f2fc5 100644 (file)
@@ -110,5 +110,5 @@ interface Responseable extends FrameworkInterface {
        function refreshCookie ($cookieName);
 }
 
-//
+// [EOF]
 ?>
diff --git a/inc/classes/interfaces/stacker/.htaccess b/inc/classes/interfaces/stacker/.htaccess
new file mode 100644 (file)
index 0000000..2effffd
--- /dev/null
@@ -0,0 +1,2 @@
+Deny from all
+Deny from all
diff --git a/inc/classes/interfaces/stacker/class_Stackable.php b/inc/classes/interfaces/stacker/class_Stackable.php
new file mode 100644 (file)
index 0000000..22c2ac6
--- /dev/null
@@ -0,0 +1,114 @@
+<?php
+/**
+ * A Stackable interface
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+interface Stackable extends FrameworkInterface {
+       /**
+        * Pushs a value on a named stacker
+        *
+        * @param       $stackerName    Name of the stacker
+        * @param       $value                  Value to push on it
+        * @return      void
+        * @throws      StackerFullException    If the stacker is full
+        */
+       function pushNamed ($stackerName, $value);
+
+       /**
+        * 'Pops' a value from a named stacker
+        *
+        * @param       $stackerName    Name of the stacker
+        * @return      void
+        * @throws      NoStackerException      If the named stacker was not found
+        * @throws      EmptyStackerException   If the named stacker is empty
+        */
+       function popNamed ($stackerName);
+
+       /**
+        * Get value from named stacker
+        *
+        * @param       $stackerName    Name of the stacker
+        * @return      $value                  Value of last added value
+        * @throws      NoStackerException      If the named stacker was not found
+        * @throws      EmptyStackerException   If the named stacker is empty
+        */
+       function getNamed ($stackerName);
+}
+
+// [EOF]
+?>
+<?php
+/**
+ * A Stackable interface
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+interface Stackable extends FrameworkInterface {
+       /**
+        * Pushs a value on a named stacker
+        *
+        * @param       $stackerName    Name of the stacker
+        * @param       $value                  Value to push on it
+        * @return      void
+        * @throws      StackerFullException    If the stacker is full
+        */
+       function pushNamed ($stackerName, $value);
+
+       /**
+        * 'Pops' a value from a named stacker
+        *
+        * @param       $stackerName    Name of the stacker
+        * @return      void
+        * @throws      NoStackerException      If the named stacker was not found
+        * @throws      EmptyStackerException   If the named stacker is empty
+        */
+       function popNamed ($stackerName);
+
+       /**
+        * Get value from named stacker
+        *
+        * @param       $stackerName    Name of the stacker
+        * @return      $value                  Value of last added value
+        * @throws      NoStackerException      If the named stacker was not found
+        * @throws      EmptyStackerException   If the named stacker is empty
+        */
+       function getNamed ($stackerName);
+}
+
+// [EOF]
+?>
index ae4a5e6..7fcd512 100644 (file)
@@ -39,5 +39,5 @@ interface EncryptableStream extends Streamable {
        function decryptStream ($encrypted);
 }
 
-//
+// [EOF]
 ?>
index 6737b56..8667cd7 100644 (file)
@@ -83,7 +83,7 @@ interface CompileableTemplate extends FrameworkInterface {
         * @return      void
         */
        function output ();
-} // END - class
+}
 
 // [EOF]
 ?>
index 9e77564..ebc32ee 100644 (file)
@@ -46,5 +46,5 @@ interface ManageableAccount extends FrameworkInterface {
        function ifPasswordHashMatches (Requestable $requestInstance);
 }
 
-//
+// [EOF]
 ?>
index c5fe84e..e46dc6a 100644 (file)
@@ -37,6 +37,7 @@ class ???!!! extends Base!!! implements CompileableTemplate {
         *
         * @param       $appInstance    A manageable application
         * @return      $///Instance    An instance of !!!
+        */
        public final static function create???!!! (ManageableApplication $appInstance) {
                // Get a new instance
                $///Instance = new ???!!!();
index 0b14dcb..10b6723 100644 (file)
@@ -98,6 +98,11 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         */
        private $imageInstance = null;
 
+       /**
+        * Instance of the stacker
+        */
+       private $stackerInstance = null;
+
        /**
         * The real class name
         */
@@ -1253,6 +1258,25 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
        public final function getImageInstance () {
                return $this->imageInstance;
        }
+
+       /**
+        * Setter for stacker instanxe
+        *
+        * @param       $stackerInstance        An instance of an stacker
+        * @return      void
+        */
+       public final function setStackerInstance (Stackable $stackerInstance) {
+               $this->stackerInstance = $stackerInstance;
+       }
+
+       /**
+        * Getter for stacker instanxe
+        *
+        * @return      $stackerInstance        An instance of an stacker
+        */
+       public final function getStackerInstance () {
+               return $this->stackerInstance;
+       }
 }
 
 // [EOF]
diff --git a/inc/classes/main/stacker/.htaccess b/inc/classes/main/stacker/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/inc/classes/main/stacker/class_ b/inc/classes/main/stacker/class_
new file mode 100644 (file)
index 0000000..1d8d8af
--- /dev/null
@@ -0,0 +1,90 @@
+<?php
+/**
+ * A ??? Stacker class
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class ???Stacker extends BaseStacker implements Stackable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of the class Stacker and prepares it for usage
+        *
+        * @param       $appInstance    A manageable application
+        * @return      $stackerInstance        An instance of ???Stacker
+        */
+       public final static function create???Stacker (ManageableApplication $appInstance) {
+               // Get a new instance
+               $stackerInstance = new ???Stacker();
+
+               // Init generic stacker
+               $stackerInstance->initStacker('generic');
+
+               // Return the prepared instance
+               return $stackerInstance;
+       }
+
+       /**
+        * Pushs a value on a named stacker
+        *
+        * @param       $stackerName    Name of the stack
+        * @param       $value                  Value to push on it
+        * @return      void
+        * @throws      StackerFullException    If the stack is full
+        */
+       public function pushNamed ($stackerName, $value) {
+               $this->partialStub('stackerName=' . $stackerName . ',value[' . gettype($value) . ']=' . $value);
+       }
+
+       /**
+        * 'Pops' a value from a named stacker
+        *
+        * @param       $stackerName    Name of the stack
+        * @return      void
+        * @throws      NoStackerException      If the named stacker was not found
+        * @throws      EmptyStackerException   If the named stacker is empty
+        */
+       public function popNamed ($stackerName) {
+               $this->partialStub('stackerName=' . $stackerName);
+       }
+
+       /**
+        * Get value from named stacker
+        *
+        * @param       $stackerName    Name of the stack
+        * @return      $value                  Value of last added value
+        * @throws      NoStackerException      If the named stacker was not found
+        * @throws      EmptyStackerException   If the named stacker is empty
+        */
+       public function getNamed ($stackerName) {
+               $this->partialStub('stackerName=' . $stackerName);
+       }
+}
+
+// [EOF]
+?>
diff --git a/inc/classes/main/stacker/class_BaseStacker.php b/inc/classes/main/stacker/class_BaseStacker.php
new file mode 100644 (file)
index 0000000..31612e1
--- /dev/null
@@ -0,0 +1,216 @@
+<?php
+/**
+ * A general Stacker
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+class BaseStacker extends BaseFrameworkSystem {
+       // Exception codes
+       const EXCEPTION_STACKER_ALREADY_INITIALIZED = 0x050;
+       const EXCEPTION_STACKER_IS_FULL             = 0x051;
+       const EXCEPTION_NO_STACKER_FOUND            = 0x052;
+       const EXCEPTION_STACKER_IS_EMPTY            = 0x053;
+
+       /**
+        * An array holding all stacks
+        */
+       private $stacks = array();
+
+       /**
+        * Protected constructor
+        *
+        * @param       $className      Name of the class
+        * @return      void
+        */
+       protected function __construct ($className) {
+               // Call parent constructor
+               parent::__construct($className);
+       }
+
+       /**
+        * Initializes given stacker
+        *
+        * @param       $stackerName    Name of the stack
+        * @return      void
+        * @throws      AlreadyInitializedStackerException      If the stack is already initialized
+        */
+       protected final function initStacker ($stackerName) {
+               // Is the stack already initialized?
+               if ($this->isStackInitialized($stackerName)) {
+                       // Then throw the exception
+                       throw new AlreadyInitializedStackerException(array($this, $stackerName), self::EXCEPTION_STACKER_ALREADY_INITIALIZED);
+               } // END - if
+
+               // Initialize the given stack
+               $this->stacks[$stackerName] = array(
+                       'max_size' => $this->getConfigInstance()->getConfigEntry('stacker_' . $stackerName . '_max_size'),
+                       'entries'  => array()
+               );
+       }
+
+       /**
+        * Checks wether the given stack is initialized (set in array $stackers)
+        *
+        * @param       $stackerName    Name of the stack
+        * @return      $isInitialized  Wether the stack is initialized
+        */
+       protected final function isStackInitialized ($stackerName) {
+               // Is is there?
+               $isInitialized = ((isset($this->stacks[$stackerName])) && (is_array($this->stacks[$stackerName])));
+
+               // Return result
+               return $isInitialized;
+       }
+
+       /**
+        * Checks wether the given stack is full
+        *
+        * @param       $stackerName    Name of the stack
+        * @return      $isFull                 Wether the stack is full
+        * @throws      NoStackerException      If given stack is missing
+        */
+       protected final function isStackFull($stackerName) {
+               // Is the stack not yet initialized?
+               if (!$this->isStackInitialized($stackerName)) {
+                       // Throw an exception
+                       throw new NoStackerException(array($this, $stackerName), self::EXCEPTION_NO_STACKER_FOUND);
+               } // END - if
+
+               // So, is the stack full?
+               $isFull = (($this->getStackCount($stackerName)) == $this->getConfigInstance()->getConfigEntry('stacker_' . $stackerName . '_max_size'));
+
+               // Return result
+               return $isFull;
+       }
+
+       /**
+        * Checks wether the given stack is empty
+        *
+        * @param       $stackerName    Name of the stack
+        * @return      $isEmpty                        Wether the stack is empty
+        * @throws      NoStackerException      If given stack is missing
+        */
+       protected final function isStackEmpty($stackerName) {
+               // Is the stack not yet initialized?
+               if (!$this->isStackInitialized($stackerName)) {
+                       // Throw an exception
+                       throw new NoStackerException(array($this, $stackerName), self::EXCEPTION_NO_STACKER_FOUND);
+               } // END - if
+
+               // So, is the stack full?
+               $isFull = (($this->getStackCount($stackerName)) == 0);
+
+               // Return result
+               return $isFull;
+       }
+
+       /**
+        * Getter for size of given stack (array count)
+        *
+        * @param       $stackerName    Name of the stack
+        * @return      $count                  Size of stack (array count)
+        * @throws      NoStackerException      If given stack is missing
+        */
+       protected final function getStackCount ($stackerName) {
+               // Is the stack not yet initialized?
+               if (!$this->isStackInitialized($stackerName)) {
+                       // Throw an exception
+                       throw new NoStackerException(array($this, $stackerName), self::EXCEPTION_NO_STACKER_FOUND);
+               } // END - if
+
+               // Now, count the array of entries
+               $count = count($this->stacks[$stackerName]['entries']);
+
+               // Return result
+               return $count;
+       }
+
+       /**
+        * Adds a value to given stack
+        *
+        * @param       $stackerName    Name of the stack
+        * @param       $value                  Value to add to this stacker
+        * @return      void
+        * @throws      FullStackerException    Thrown if the stack is full
+        */
+       protected final function addValue ($stackerName, $value) {
+               // Is the stack not yet initialized or full?
+               if (!$this->isStackInitialized($stackerName)) {
+                       // Then do it here
+                       $this->initStacker($stackerName);
+               } elseif ($this->isStackFull($stackerName)) {
+                       // Stacker is full
+                       throw new FullStackerException(array($this, $stackerName, $value), self::EXCEPTION_STACKER_IS_FULL);
+               }
+
+               // Now add the value to the stack
+               array_push($this->stacks[$stackerName]['entries'], $value);
+       }
+
+       /**
+        * Get last value from named stacker
+        *
+        * @param       $stackerName    Name of the stack
+        * @return      $value                  Value of last added value
+        * @throws      NoStackerException      If the named stacker was not found
+        * @throws      EmptyStackerException   If the named stacker is empty
+        */
+       protected final function getLastValue ($stackerName) {
+               // Is the stack not yet initialized or full?
+               if (!$this->isStackInitialized($stackerName)) {
+                       // Throw an exception
+                       throw new NoStackerException(array($this, $stackerName), self::EXCEPTION_NO_STACKER_FOUND);
+               } elseif ($this->isStackEmpty($stackerName)) {
+                       //Throw an exception
+                       throw new EmptyStackerException(array($this, $stackerName), self::EXCEPTION_STACKER_IS_EMPTY);
+               }
+
+               // Now get the last value
+               $value = $this->stacks[$stackerName]['entries'][$this->getStackCount($stackerName) - 1];
+
+               // Return it
+               return $value;
+       }
+
+       /**
+        * "Pops" last entry from stack
+        *
+        * @param       $stackerName    Name of the stack
+        * @return      void
+        * @throws      NoStackerException      If the named stacker was not found
+        * @throws      EmptyStackerException   If the named stacker is empty
+        */
+       protected final function popLast ($stackerName) {
+               // Is the stack not yet initialized or full?
+               if (!$this->isStackInitialized($stackerName)) {
+                       // Throw an exception
+                       throw new NoStackerException(array($this, $stackerName), self::EXCEPTION_NO_STACKER_FOUND);
+               } elseif ($this->isStackEmpty($stackerName)) {
+                       //Throw an exception
+                       throw new EmptyStackerException(array($this, $stackerName), self::EXCEPTION_STACKER_IS_EMPTY);
+               }
+
+               // Now, remove the last entry, we don't care about the return value here, see elseif() block above
+               array_pop($this->stacks[$stackerName]['entries']);
+       }
+}
+
+// [EOF]
+?>
diff --git a/inc/classes/main/stacker/fifo/.htaccess b/inc/classes/main/stacker/fifo/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/inc/classes/main/stacker/fifo/class_FiFoStacker.php b/inc/classes/main/stacker/fifo/class_FiFoStacker.php
new file mode 100644 (file)
index 0000000..fa88aa9
--- /dev/null
@@ -0,0 +1,89 @@
+<?php
+/**
+ * A FiFo Stacker class
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class FiFoStacker extends BaseStacker implements Stackable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of the class Stacker and prepares it for usage
+        *
+        * @return      $stackerInstance        An instance of FiFoStacker
+        */
+       public final static function createFiFoStacker () {
+               // Get a new instance
+               $stackerInstance = new FiFoStacker();
+
+               // Init generic stacker
+               $stackerInstance->initStacker('generic');
+
+               // Return the prepared instance
+               return $stackerInstance;
+       }
+
+       /**
+        * Pushs a value on a named stacker
+        *
+        * @param       $stackerName    Name of the stack
+        * @param       $value                  Value to push on it
+        * @return      void
+        * @throws      StackerFullException    If the stack is full
+        */
+       public function pushNamed ($stackerName, $value) {
+               $this->partialStub('stackerName=' . $stackerName . ',value[' . gettype($value) . ']=' . $value);
+       }
+
+       /**
+        * 'Pops' a value from a named stacker
+        *
+        * @param       $stackerName    Name of the stack
+        * @return      void
+        * @throws      NoStackerException      If the named stacker was not found
+        * @throws      EmptyStackerException   If the named stacker is empty
+        */
+       public function popNamed ($stackerName) {
+               $this->partialStub('stackerName=' . $stackerName);
+       }
+
+       /**
+        * Get value from named stacker
+        *
+        * @param       $stackerName    Name of the stack
+        * @return      $value                  Value of last added value
+        * @throws      NoStackerException      If the named stacker was not found
+        * @throws      EmptyStackerException   If the named stacker is empty
+        */
+       public function getNamed ($stackerName) {
+               $this->partialStub('stackerName=' . $stackerName);
+       }
+}
+
+// [EOF]
+?>
diff --git a/inc/classes/main/stacker/filo/.htaccess b/inc/classes/main/stacker/filo/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/inc/classes/main/stacker/filo/class_FiLoStacker.php b/inc/classes/main/stacker/filo/class_FiLoStacker.php
new file mode 100644 (file)
index 0000000..1a80cef
--- /dev/null
@@ -0,0 +1,92 @@
+<?php
+/**
+ * A FiLo Stacker class
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class FiLoStacker extends BaseStacker implements Stackable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of the class Stacker and prepares it for usage
+        *
+        * @return      $stackerInstance        An instance of FiLoStacker
+        */
+       public final static function createFiLoStacker () {
+               // Get a new instance
+               $stackerInstance = new FiLoStacker();
+
+               // Init the generic stacker
+               $stackerInstance->initStacker('generic');
+
+               // Return the prepared instance
+               return $stackerInstance;
+       }
+
+       /**
+        * Pushs a value on a named stacker
+        *
+        * @param       $stackerName    Name of the stack
+        * @param       $value                  Value to push on it
+        * @return      void
+        * @throws      StackerFullException    If the stack is full
+        */
+       public function pushNamed ($stackerName, $value) {
+               // Call the protected method
+               parent::addValue($stackerName, $value);
+       }
+
+       /**
+        * 'Pops' a value from a named stacker
+        *
+        * @param       $stackerName    Name of the stack
+        * @return      void
+        * @throws      NoStackerException      If the named stacker was not found
+        * @throws      EmptyStackerException   If the named stacker is empty
+        */
+       public function popNamed ($stackerName) {
+               // Call the protected method
+               parent::popLast($stackerName);
+       }
+
+       /**
+        * Get value from named stacker
+        *
+        * @param       $stackerName    Name of the stack
+        * @return      $value                  Value of last added value
+        * @throws      NoStackerException      If the named stacker was not found
+        * @throws      EmptyStackerException   If the named stacker is empty
+        */
+       public function getNamed ($stackerName) {
+               // Call the protected method
+               return parent::getLastValue($stackerName);
+       }
+}
+
+// [EOF]
+?>
index 37dfca2..597b014 100644 (file)
@@ -141,6 +141,12 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
                // Set the menu instance
                $tplInstance->setMenuInstance($menuInstance);
 
+               // Init a variable stacker
+               $stackerInstance = ObjectFactory::createObjectByConfiguredName('menu_stacker_class');
+
+               // Set it
+               $tplInstance->setStackerInstance($stackerInstance);
+
                // Return the prepared instance
                return $tplInstance;
        }
@@ -279,8 +285,9 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
                        return false;
                } // END - if
 
-               // Unfinished work!
-               $this->partialStub('Handling extra characters is not yet supported! length='.strlen($characters));
+               // Assign the found characters to variable and use the last entry from
+               // stack as the name
+               parent::assignVariable($this->getStackerInstance()->getNamed('current_node'), $characters);
        }
 
        /**
@@ -465,13 +472,164 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
                $this->assignVariable('footer_end', $this->getTemplateInstance()->getRawTemplateData());
        }
 
+       /**
+        * Starts the menu property 'block-list'
+        *
+        * @return      void
+        */
+       private function startBlockList () {
+               // Push the node name on the stacker
+               $this->getStackerInstance()->pushNamed('current_node', 'block-list');
+       }
+
+       /**
+        * Starts the menu property 'block'
+        *
+        * @return      void
+        */
+       private function startBlock () {
+               // Push the node name on the stacker
+               $this->getStackerInstance()->pushNamed('current_node', 'block');
+       }
+
        /**
         * Starts the menu property 'title'
         *
         * @return      void
         */
        private function startTitle () {
-               $this->partialStub('Cleared due to XML rewrite.');
+               // Push the node name on the stacker
+               $this->getStackerInstance()->pushNamed('current_node', 'title');
+       }
+
+       /**
+        * Starts the menu property 'title-id'
+        *
+        * @return      void
+        */
+       private function startTitleId () {
+               // Push the node name on the stacker
+               $this->getStackerInstance()->pushNamed('current_node', 'title-id');
+       }
+
+       /**
+        * Starts the menu property 'title-class'
+        *
+        * @return      void
+        */
+       private function startTitleClass () {
+               // Push the node name on the stacker
+               $this->getStackerInstance()->pushNamed('current_node', 'title-class');
+       }
+
+       /**
+        * Starts the menu property 'title-text'
+        *
+        * @return      void
+        */
+       private function startTitleText () {
+               // Push the node name on the stacker
+               $this->getStackerInstance()->pushNamed('current_node', 'title-text');
+       }
+
+       /**
+        * Starts the menu property 'entry'
+        *
+        * @return      void
+        */
+       private function startEntry () {
+               // Push the node name on the stacker
+               $this->getStackerInstance()->pushNamed('current_node', 'entry');
+       }
+
+       /**
+        * Starts the menu property 'entry-id'
+        *
+        * @return      void
+        */
+       private function startEntryId () {
+               // Push the node name on the stacker
+               $this->getStackerInstance()->pushNamed('current_node', 'entry-id');
+       }
+
+       /**
+        * Starts the menu property 'anchor'
+        *
+        * @return      void
+        */
+       private function startAnchor () {
+               // Push the node name on the stacker
+               $this->getStackerInstance()->pushNamed('current_node', 'anchor');
+       }
+
+       /**
+        * Starts the menu property 'anchor-id'
+        *
+        * @return      void
+        */
+       private function startAnchorId () {
+               // Push the node name on the stacker
+               $this->getStackerInstance()->pushNamed('current_node', 'anchor-id');
+       }
+
+       /**
+        * Starts the menu property 'anchor-text'
+        *
+        * @return      void
+        */
+       private function startAnchorText () {
+               // Push the node name on the stacker
+               $this->getStackerInstance()->pushNamed('current_node', 'anchor-text');
+       }
+
+       /**
+        * Starts the menu property 'anchor-title'
+        *
+        * @return      void
+        */
+       private function startAnchorTitle () {
+               // Push the node name on the stacker
+               $this->getStackerInstance()->pushNamed('current_node', 'anchor-title');
+       }
+
+       /**
+        * Starts the menu property 'anchor-href'
+        *
+        * @return      void
+        */
+       private function startAnchorHref () {
+               // Push the node name on the stacker
+               $this->getStackerInstance()->pushNamed('current_node', 'anchor-href');
+       }
+
+       /**
+        * Starts the menu property 'footer-id'
+        *
+        * @return      void
+        */
+       private function startFooterId () {
+               // Push the node name on the stacker
+               $this->getStackerInstance()->pushNamed('current_node', 'footer-id');
+       }
+
+       /**
+        * Starts the menu property 'footer-class'
+        *
+        * @return      void
+        */
+       private function startFooterClass () {
+               // Push the node name on the stacker
+               $this->getStackerInstance()->pushNamed('current_node', 'footer-class');
+       }
+
+       /**
+        * Starts the menu property 'footer-text'
+        *
+        * @return      void
+        */
+       private function startFooterText () {
+               // Push the node name on the stacker
+               $this->getStackerInstance()->pushNamed('current_node', 'footer-text');
        }
 
        /**
@@ -480,87 +638,199 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
         * @return      void
         */
        private function finishTitle () {
-               $this->partialStub('Cleared due to XML rewrite.');
+               // Pop the last entry
+               $this->getStackerInstance()->popNamed('current_node');
        }
 
        /**
-        * Starts the menu text
+        * Finishes the title-id node by
         *
         * @return      void
         */
-       private function startText () {
-               // Do we have a template instance?
-               if (is_null($this->getTemplateInstance())) {
-                       // Init template instance for underlaying web templates
-                       $templateInstance = ObjectFactory::createObjectByConfiguredName('web_template_class');
+       private function finishTitleId () {
+               // Pop the last entry
+               $this->getStackerInstance()->popNamed('current_node');
+       }
 
-                       // Set it in this template engine
-                       $this->setTemplateInstance($templateInstance);
-               } // END - if
+       /**
+        * Finishes the title-class node
+        *
+        * @return      void
+        */
+       private function finishTitleClass () {
+               // Pop the last entry
+               $this->getStackerInstance()->popNamed('current_node');
+       }
 
-               // Load the text template for this page
-               $this->getTemplateInstance()->loadCodeTemplate('menu_text_start');
+       /**
+        * Finishes the title-class node
+        *
+        * @return      void
+        */
+       private function finishTitleText () {
+               // Pop the last entry
+               $this->getStackerInstance()->popNamed('current_node');
+       }
 
-               // Set the variable group to page
-               $this->setVariableGroup('menu');
+       /**
+        * Finishes the footer-text node
+        *
+        * @return      void
+        */
+       private function finishFooterText () {
+               // Pop the last entry
+               $this->getStackerInstance()->popNamed('current_node');
+       }
 
-               // Set its content in this template instance
-               $this->assignVariable('text', $this->getTemplateInstance()->getRawTemplateData());
+       /**
+        * Finishes the footer-class node
+        *
+        * @return      void
+        */
+       private function finishFooterClass () {
+               // Pop the last entry
+               $this->getStackerInstance()->popNamed('current_node');
        }
 
        /**
-        * Finishes the menu text
+        * Finishes the footer-id node
         *
         * @return      void
         */
-       private function finishText () {
-               // Load the text template for this page
-               $this->getTemplateInstance()->loadCodeTemplate('menu_text_end');
+       private function finishFooterId () {
+               // Pop the last entry
+               $this->getStackerInstance()->popNamed('current_node');
+       }
 
-               // Set the variable group to page
-               $this->setVariableGroup('menu');
+       /**
+        * Finishes the anchor-href node
+        *
+        * @return      void
+        */
+       private function finishAnchorHref () {
+               // Pop the last entry
+               $this->getStackerInstance()->popNamed('current_node');
+       }
 
-               // Set its content in this template instance
-               $this->assignVariable('text_end', $this->getTemplateInstance()->getRawTemplateData());
+       /**
+        * Finishes the anchor-title node
+        *
+        * @return      void
+        */
+       private function finishAnchorTitle () {
+               // Pop the last entry
+               $this->getStackerInstance()->popNamed('current_node');
        }
 
        /**
-        * Starts the menu property 'entry'
+        * Finishes the anchor-text node
         *
         * @return      void
         */
-       private function startEntry () {
-               $this->partialStub('Cleared due to XML rewrite.');
+       private function finishAnchorText () {
+               // Pop the last entry
+               $this->getStackerInstance()->popNamed('current_node');
        }
 
        /**
-        * Finishes the entry node by added another template to the menu
+        * Finishes the anchor-id node
+        *
+        * @return      void
+        */
+       private function finishAnchorId () {
+               // Pop the last entry
+               $this->getStackerInstance()->popNamed('current_node');
+       }
+
+       /**
+        * Finishes the anchor node
+        *
+        * @return      void
+        */
+       private function finishAnchor () {
+               // Pop the last entry
+               $this->getStackerInstance()->popNamed('current_node');
+       }
+
+       /**
+        * Finishes the entry-id node
+        *
+        * @return      void
+        */
+       private function finishEntryId () {
+               // Pop the last entry
+               $this->getStackerInstance()->popNamed('current_node');
+       }
+
+       /**
+        * Finishes the entry node
         *
         * @return      void
         */
        private function finishEntry () {
-               $this->partialStub('Cleared due to XML rewrite.');
+               // Pop the last entry
+               $this->getStackerInstance()->popNamed('current_node');
        }
 
        /**
-        * Starts the menu property 'anchor'
+        * Finishes the block node
         *
-        * @param       $id             Id of the anchor
-        * @param       $link   Link text of the anchor
-        * @param       $title  Link title of the anchor
         * @return      void
         */
-       private function startAnchor () {
-               $this->partialStub('Please implement this method.');
+       private function finishBlock () {
+               // Pop the last entry
+               $this->getStackerInstance()->popNamed('current_node');
        }
 
        /**
-        * Finishes the anchor node by added another template to the menu
+        * Finishes the block-list node
         *
         * @return      void
         */
-       private function finishAnchor () {
-               $this->partialStub('Please implement this method.');
+       private function finishBlockList () {
+               // Pop the last entry
+               $this->getStackerInstance()->popNamed('current_node');
+       }
+
+       /**
+        * Starts the menu text
+        *
+        * @return      void
+        */
+       private function startText () {
+               // Do we have a template instance?
+               if (is_null($this->getTemplateInstance())) {
+                       // Init template instance for underlaying web templates
+                       $templateInstance = ObjectFactory::createObjectByConfiguredName('web_template_class');
+
+                       // Set it in this template engine
+                       $this->setTemplateInstance($templateInstance);
+               } // END - if
+
+               // Load the text template for this page
+               $this->getTemplateInstance()->loadCodeTemplate('menu_text_start');
+
+               // Set the variable group to page
+               $this->setVariableGroup('menu');
+
+               // Set its content in this template instance
+               $this->assignVariable('text', $this->getTemplateInstance()->getRawTemplateData());
+       }
+
+       /**
+        * Finishes the menu text
+        *
+        * @return      void
+        */
+       private function finishText () {
+               // Load the text template for this page
+               $this->getTemplateInstance()->loadCodeTemplate('menu_text_end');
+
+               // Set the variable group to page
+               $this->setVariableGroup('menu');
+
+               // Set its content in this template instance
+               $this->assignVariable('text_end', $this->getTemplateInstance()->getRawTemplateData());
        }
 
        /**
index 9e33cfa..817a337 100644 (file)
@@ -305,5 +305,14 @@ $cfg->setConfigEntry('product_install_mode', 'debug');
 // CFG: DECIMALS
 $cfg->setConfigEntry('decimals', 3);
 
+// CFG: STACKER-CLASS
+$cfg->setConfigEntry('menu_stacker_class', 'FiLoStacker');
+
+// CFG: STACKER-GENERIC-MAX-SIZE
+$cfg->setConfigEntry('stacker_generic_max_size', 100);
+
+// CFG: STACKER-CURRENT-NODE-MAX-SIZE
+$cfg->setConfigEntry('stacker_current_node_max_size', 20);
+
 // [EOF]
 ?>