X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=framework%2Fmain%2Fclasses%2Fstacker%2Ffifo%2Fclass_FiFoStacker.php;h=c19b614a43b5a22a5101d2d8907d885c3b465129;hb=a62dc7cb30b3a7edd46ab1ad0b8d68102c0e36c5;hp=1becb96b2dadc0c3cf41765ba9ff2194cb4eb6a7;hpb=3ed365cb1808ac8a228da18241e789866f419178;p=core.git diff --git a/framework/main/classes/stacker/fifo/class_FiFoStacker.php b/framework/main/classes/stacker/fifo/class_FiFoStacker.php index 1becb96b..c19b614a 100644 --- a/framework/main/classes/stacker/fifo/class_FiFoStacker.php +++ b/framework/main/classes/stacker/fifo/class_FiFoStacker.php @@ -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 * @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