From: Roland Häder Date: Mon, 12 Apr 2010 10:00:29 +0000 (+0000) Subject: Some methods are now public and added to the interface X-Git-Url: https://git.mxchange.org/?p=core.git;a=commitdiff_plain;h=b3649e68029a4b262010b35e2394ef39e17e112c Some methods are now public and added to the interface --- diff --git a/inc/classes/interfaces/stacker/class_Stackable.php b/inc/classes/interfaces/stacker/class_Stackable.php index 7b47b076..31247f55 100644 --- a/inc/classes/interfaces/stacker/class_Stackable.php +++ b/inc/classes/interfaces/stacker/class_Stackable.php @@ -51,6 +51,23 @@ interface Stackable extends FrameworkInterface { * @throws EmptyStackerException If the named stacker is empty */ function getNamed ($stackerName); + + /** + * Checks wether the given stack is initialized (set in array $stackers) + * + * @param $stackerName Name of the stack + * @return $isInitialized Wether the stack is initialized + */ + function isStackInitialized ($stackerName); + + /** + * 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 + */ + function isStackEmpty ($stackerName); } // [EOF] diff --git a/inc/classes/main/stacker/class_BaseStacker.php b/inc/classes/main/stacker/class_BaseStacker.php index 4225cb73..5c25e928 100644 --- a/inc/classes/main/stacker/class_BaseStacker.php +++ b/inc/classes/main/stacker/class_BaseStacker.php @@ -71,7 +71,7 @@ class BaseStacker extends BaseFrameworkSystem { * @param $stackerName Name of the stack * @return $isInitialized Wether the stack is initialized */ - protected final function isStackInitialized ($stackerName) { + public final function isStackInitialized ($stackerName) { // Is is there? $isInitialized = ((isset($this->stacks[$stackerName])) && (is_array($this->stacks[$stackerName]))); @@ -86,7 +86,7 @@ class BaseStacker extends BaseFrameworkSystem { * @return $isFull Wether the stack is full * @throws NoStackerException If given stack is missing */ - protected final function isStackFull($stackerName) { + protected final function isStackFull ($stackerName) { // Is the stack not yet initialized? if (!$this->isStackInitialized($stackerName)) { // Throw an exception @@ -107,7 +107,7 @@ class BaseStacker extends BaseFrameworkSystem { * @return $isEmpty Wether the stack is empty * @throws NoStackerException If given stack is missing */ - protected final function isStackEmpty($stackerName) { + public final function isStackEmpty ($stackerName) { // Is the stack not yet initialized? if (!$this->isStackInitialized($stackerName)) { // Throw an exception