//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('SEARCH-CRITERIA: configKey=%s - CALLED!', $configKey));
if (empty($configKey)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "configKey" is empty');
+ throw new InvalidArgumentException('Parameter "configKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Get the limit from config entry
// Own namespace
namespace Org\Mxchange\CoreFramework\Registry;
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
+
/**
* A registry for several data types and objects. Objects should be added by
* addInstance() and therefore must implement the interface Registerable.
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('OBJECT-REGISTRY: key=%s - CALLED!', $key));
if (empty($key)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "key" is empty');
+ throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Is an instance there?
namespace Org\Mxchange\CoreFramework\Registry\Object;
// Import framework stuff
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Generic\NullPointerException;
use Org\Mxchange\CoreFramework\Registry\BaseRegistry;
use Org\Mxchange\CoreFramework\Registry\Registerable;
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('OBJECT-REGISTRY: key=%s - CALLED!', $key));
if (empty($key)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "key" is empty');
+ throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Is an instance there?
// Import framework stuff
use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
// Import SPL stuff
//* NOISY-DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('NUMBER-UTILS: timestamp[%s]=%s - CALLED!', gettype($timestamp), $timestamp));
if (empty($timestamp)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "timestamp" is empty');
+ throw new InvalidArgumentException('Parameter "timestamp" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Default value to return
//* NOISY-DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('NUMBER-UTILS: num=%s,castValue=%d,assertMismatch=%d - CALLED!', $num, intval($castValue), intval($assertMismatch)));
if ($num === '') {
// Throw IAE
- throw new InvalidArgumentException('Parameter "num" is empty');
+ throw new InvalidArgumentException('Parameter "num" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Filter all numbers out
//* NOISY-DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('STRING-UTILS: hex=%s - CALLED!', $hex));
if (empty($hex)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "hex" is empty');
+ throw new InvalidArgumentException('Parameter "hex" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Convert to all lower-case
//* NOISY-DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('STRING-UTILS: asc=%s - CALLED!', $asc));
if (empty($asc)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "asc" is empty');
+ throw new InvalidArgumentException('Parameter "asc" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Convert it into a hexadecimal number
/* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('STRING-UTILS: hex=%s - CALLED!', $hex));
if (empty($hex)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "hex" is empty');
+ throw new InvalidArgumentException('Parameter "hex" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif ((strlen($hex) % 2) != 0) {
// Throw it again
throw new InvalidArgumentException(sprintf('hex=%s length not dividable by 2', $hex));
//* NOISY-DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('STRING-UTILS: str=%s - CALLED!', $str));
if (empty($str)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "str" is empty');
+ throw new InvalidArgumentException('Parameter "str" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// First compress the string (gzcompress is okay)
//* NOISY-DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('STRING-UTILS: num=%s,assertMismatch=%d - CALLED!', $num, intval($assertMismatch)));
if (empty($num)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "num" is empty');
+ throw new InvalidArgumentException('Parameter "num" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Filter all numbers out