From: Roland Häder Date: Fri, 28 Jun 2013 21:47:58 +0000 (+0000) Subject: Added option parameter 'forceInit' X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3042aafae8499f33e7b7ca0c3be4bca95543d4f8;p=core.git Added option parameter 'forceInit' --- diff --git a/inc/classes/main/class_BaseFrameworkSystem.php b/inc/classes/main/class_BaseFrameworkSystem.php index b48b030c..0fb474dc 100644 --- a/inc/classes/main/class_BaseFrameworkSystem.php +++ b/inc/classes/main/class_BaseFrameworkSystem.php @@ -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 diff --git a/inc/classes/main/stacker/class_BaseStacker.php b/inc/classes/main/stacker/class_BaseStacker.php index d5917bb5..aaa1adca 100644 --- a/inc/classes/main/stacker/class_BaseStacker.php +++ b/inc/classes/main/stacker/class_BaseStacker.php @@ -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); } /**