Added option parameter 'forceInit'
authorRoland Häder <roland@mxchange.org>
Fri, 28 Jun 2013 21:47:58 +0000 (21:47 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 28 Jun 2013 21:47:58 +0000 (21:47 +0000)
inc/classes/main/class_BaseFrameworkSystem.php
inc/classes/main/stacker/class_BaseStacker.php

index b48b030..0fb474d 100644 (file)
@@ -2225,11 +2225,12 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         * @param       $keyGroup       Main group for the key
         * @param       $subGroup       Sub group for the key
         * @param       $key            Key to use
+        * @param       $forceInit      Optionally force initialization
         * @return      void
         */
-       protected final function initGenericArray ($keyGroup, $subGroup, $key) {
+       protected final function initGenericArray ($keyGroup, $subGroup, $key, $forceInit = FALSE) {
                // Is it already set?
-               if ($this->isGenericArrayKeySet($keyGroup, $subGroup, $key)) {
+               if (($forceInit === FALSE) && ($this->isGenericArrayKeySet($keyGroup, $subGroup, $key))) {
                        // Already initialized
                        trigger_error(__METHOD__ . ':keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key . ' already initialized.');
                } // END - if
index d5917bb..aaa1adc 100644 (file)
@@ -55,7 +55,7 @@ class BaseStacker extends BaseFrameworkSystem {
                } // END - if
 
                // Initialize the given stack
-               $this->initGenericArray('stacks', $stackerName, 'entries');
+               $this->initGenericArray('stacks', $stackerName, 'entries', $forceReInit);
        }
 
        /**