X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=framework%2Fmain%2Finterfaces%2Fstacker%2Fclass_Stackable.php;h=4881c6f6d9565641d2ba15be6e2f9d317ecae34f;hb=refs%2Fheads%2Fmaster;hp=3a2ddb2cacff27a16afa06161c1a6d3163e65c4c;hpb=c1841c5d8ad644456ea408caf315e858d89fc555;p=core.git diff --git a/framework/main/interfaces/stacker/class_Stackable.php b/framework/main/interfaces/stacker/class_Stackable.php index 3a2ddb2c..4881c6f6 100644 --- a/framework/main/interfaces/stacker/class_Stackable.php +++ b/framework/main/interfaces/stacker/class_Stackable.php @@ -10,7 +10,7 @@ use Org\Mxchange\CoreFramework\Generic\FrameworkInterface; * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2020 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2023 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.shipsimu.org * @@ -34,7 +34,7 @@ interface Stackable extends FrameworkInterface { * @param $stackerName Name of the stacker * @param $value Value to push on it * @return void - * @throws StackerFullException If the stacker is full + * @throws BadMethodCallException If the stacker is full */ function pushNamed (string $stackerName, $value); @@ -75,4 +75,30 @@ interface Stackable extends FrameworkInterface { */ function isStackEmpty (string $stackerName); + /** + * Initializes given stacker + * + * @param $stackerName Name of the stack + * @param $forceReInit Force re-initialization + * @return void + * @throws UnsupportedOperationException This method is not (and maybe never will be) supported + */ + function initStack (string $stackerName, bool $forceReInit = false); + + /** + * Initializes all stacks + * + * @return void + * @throws UnsupportedOperationException This method is not (and maybe never will be) supported + */ + function initStacks (array $stacks, bool $forceReInit = false); + + /** + * Getter for size of given stack (array count) + * + * @param $stackerName Name of the stack + * @return $count Size of stack (array count) + */ + function getStackCount (string $stackerName); + }