]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/stacker/class_BaseStacker.php
Cleanups, re-initialization of stackers added:
[core.git] / inc / classes / main / stacker / class_BaseStacker.php
index b029e4e2ca920ed0fe2b06fb01be3157e8b0c8d5..0251661dfa753f476ad339b36a65861b95a3e4fd 100644 (file)
@@ -48,12 +48,13 @@ class BaseStacker extends BaseFrameworkSystem {
         * Initializes given stacker
         *
         * @param       $stackerName    Name of the stack
         * Initializes given stacker
         *
         * @param       $stackerName    Name of the stack
+        * @param       $forceReInit    Force re-initialization
         * @return      void
         * @throws      AlreadyInitializedStackerException      If the stack is already initialized
         */
         * @return      void
         * @throws      AlreadyInitializedStackerException      If the stack is already initialized
         */
-       public final function initStacker ($stackerName) {
+       public final function initStacker ($stackerName, $forceReInit = false) {
                // Is the stack already initialized?
                // Is the stack already initialized?
-               if ($this->isStackInitialized($stackerName)) {
+               if (($forceReInit === true) && ($this->isStackInitialized($stackerName))) {
                        // Then throw the exception
                        throw new AlreadyInitializedStackerException(array($this, $stackerName), self::EXCEPTION_STACKER_ALREADY_INITIALIZED);
                } // END - if
                        // Then throw the exception
                        throw new AlreadyInitializedStackerException(array($this, $stackerName), self::EXCEPTION_STACKER_ALREADY_INITIALIZED);
                } // END - if