]> 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 32574ee72f306e66ac75ad5aad5b254bb88565be..cf590a76e9b959a0ed614045ca42bb5e2514ba58 100644 (file)
@@ -72,10 +72,13 @@ class FiFoStacker extends BaseStacker implements Stackable {
                if (empty($stackerName)) {
                        // No empty stack name
                        throw new InvalidArgumentException('Parameter "stackerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
+               } elseif (is_resource($value) || is_array($value) || is_object($value)) {
+                       // Unsupported variable type
+                       throw new InvalidArgumentException(sprintf('value[]=%s is not supported', gettype($value)), 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
@@ -100,11 +103,11 @@ class FiFoStacker extends BaseStacker implements Stackable {
                }
 
                // 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
@@ -130,7 +133,7 @@ class FiFoStacker extends BaseStacker implements Stackable {
                }
 
                // 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