]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/stacker/fifo/class_FiFoStacker.php
Continued:
[core.git] / framework / main / classes / stacker / fifo / class_FiFoStacker.php
index 1becb96b2dadc0c3cf41765ba9ff2194cb4eb6a7..c19b614a43b5a22a5101d2d8907d885c3b465129 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Org\Mxchange\CoreFramework\Stack;
 
+// Import framework-specific stuff
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
+
 // Import SPL stuff
 use \InvalidArgumentException;
 
@@ -10,7 +13,7 @@ use \InvalidArgumentException;
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2020 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2022 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -68,11 +71,11 @@ class FiFoStacker extends BaseStacker implements Stackable {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-STACKER: stackerName=%s,value[]=%s - CALLED!', $stackerName, gettype($value)));
                if (empty($stackerName)) {
                        // No empty stack name
-                       throw new InvalidArgumentException('Parameter "stackerName" is empty');
+                       throw new InvalidArgumentException('Parameter "stackerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Call the protected method
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-STACKER: Calling parent::addValueToStack(%s,%s) ...', $stackerName, gettype($value)));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-STACKER: Invoking parent::addValueToStack(%s,%s) ...', $stackerName, gettype($value)));
                parent::addValueToStack($stackerName, $value);
 
                // Trace message
@@ -93,15 +96,15 @@ class FiFoStacker extends BaseStacker implements Stackable {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-STACKER: stackerName=%s - CALLED!', $stackerName));
                if (empty($stackerName)) {
                        // No empty stack name
-                       throw new InvalidArgumentException('Parameter "stackerName" is empty');
+                       throw new InvalidArgumentException('Parameter "stackerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Get the value
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-STACKER: Calling this->getNamed(%s) ...', $stackerName));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-STACKER: Invoking this->getNamed(%s) ...', $stackerName));
                $value = $this->getNamed($stackerName);
 
                // Call the protected method
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-STACKER: Calling parent::popFirst(%s) ...', $stackerName));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-STACKER: Invoking parent::popFirst(%s) ...', $stackerName));
                parent::popFirst($stackerName);
 
                // Return the value
@@ -123,11 +126,11 @@ class FiFoStacker extends BaseStacker implements Stackable {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-STACKER: stackerName=%s - CALLED!', $stackerName));
                if (empty($stackerName)) {
                        // No empty stack name
-                       throw new InvalidArgumentException('Parameter "stackerName" is empty');
+                       throw new InvalidArgumentException('Parameter "stackerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Call the protected method
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-STACKER: Calling parent::getFirstValue(%s) ...', $stackerName));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-STACKER: Invoking parent::getFirstValue(%s) ...', $stackerName));
                $value = parent::getFirstValue($stackerName);
 
                // Return value