Some methods are now public and added to the interface
authorRoland Häder <roland@mxchange.org>
Mon, 12 Apr 2010 10:00:29 +0000 (10:00 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 12 Apr 2010 10:00:29 +0000 (10:00 +0000)
inc/classes/interfaces/stacker/class_Stackable.php
inc/classes/main/stacker/class_BaseStacker.php

index 7b47b07631f5d846289337121066bfec68519db9..31247f553b78c9f0fe03ff5cbab50f17b756a8e9 100644 (file)
@@ -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]
index 4225cb731b57e7ee7c895ae056c70613a8111441..5c25e928ee0dabcb1e8088727d8fd1a81a9a276e 100644 (file)
@@ -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