]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/stacker/file/fifo/class_FiFoFileStack.php
Continued:
[core.git] / inc / classes / main / stacker / file / fifo / class_FiFoFileStack.php
index fea12a53320abbe0a2fdc39aa2318b47a4b679f3..47c1056a6a98dcf63721cb543a3b0121d2dd4bd1 100644 (file)
@@ -59,19 +59,27 @@ class FiFoFileStack extends BaseFileStack implements StackableFile, Calculatable
         * @throws      StackerFullException    If the stack is full
         */
        public function pushNamed ($stackerName, $value) {
-               $this->partialStub('stackerName=' . $stackerName . ',value[' . gettype($value) . ']=' . $value);
+               // Call the protected method
+               parent::addValue($stackerName, $value);
        }
 
        /**
-        * '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) {
-               $this->partialStub('stackerName=' . $stackerName);
+               // Get the value
+               $value = $this->getNamed($stackerName);
+
+               // Call the protected method
+               parent::popFirst($stackerName);
+
+               // Return the value
+               return $value;
        }
 
        /**
@@ -83,7 +91,8 @@ class FiFoFileStack extends BaseFileStack implements StackableFile, Calculatable
         * @throws      EmptyStackerException   If the named stacker is empty
         */
        public function getNamed ($stackerName) {
-               $this->partialStub('stackerName=' . $stackerName);
+               // Call the protected method
+               return parent::getFirstValue($stackerName);
        }
 
        /**