/**
* A FiLo Stacker class
*
- * @author Roland Haeder <webmaster@ship-simu.org>
+ * @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Core Developer Team
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
* @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
+ * @link http://www.shipsimu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/**
* Creates an instance of the class Stacker and prepares it for usage
*
- * @return $stackerInstance An instance of FiLoStacker
+ * @return $stackInstance An instance of FiLoStacker
*/
public static final function createFiLoStacker () {
// Get a new instance
- $stackerInstance = new FiLoStacker();
+ $stackInstance = new FiLoStacker();
// Init the generic stacker
- $stackerInstance->initStacker('generic');
+ $stackInstance->initStack('generic');
// Return the prepared instance
- return $stackerInstance;
+ return $stackInstance;
}
/**
}
/**
- * '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::popLast($stackerName);
+
+ // Return the value
+ return $value;
}
/**