popNamed() does also now return the current stacker's value.
[core.git] / inc / classes / main / stacker / fifo / class_FiFoStacker.php
index 5b036a4feda7f4973df96657e9309c13494c52fa..7b33cd9d8c3b9e78860c994512d00f778a6d152a 100644 (file)
@@ -62,16 +62,22 @@ class FiFoStacker extends BaseStacker implements Stackable {
        }
 
        /**
-        * 'Pops' a value from a named stacker
+        * 'Pops' a value from a named stacker and returns it's value
         *
         * @param       $stackerName    Name of the stack
-        * @return      void
+        * @return      $value                  Value of the current stack entry
         * @throws      NoStackerException      If the named stacker was not found
         * @throws      EmptyStackerException   If the named stacker is empty
         */
        public function popNamed ($stackerName) {
+               // Get the value
+               $value = $this->getNamed($stackerName();
+
                // Call the protected method
                parent::popFirst($stackerName);
+
+               // Return the value
+               return $value;
        }
 
        /**