use Org\Mxchange\CoreFramework\Console\Tools\ConsoleTools;
use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Generic\NullPointerException;
use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
use Org\Mxchange\CoreFramework\Localization\ManageableLanguage;
// Is it set?
if (empty($timezone)) {
// Entry is empty
- throw new InvalidArgumentException('timezone is empty');
+ throw new InvalidArgumentException('Parameter "timezone" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Default success
//* NOISY-DEBUG: */ printf('[%s:%d]: configKey=%s - CALLED!' . PHP_EOL, __METHOD__, __LINE__, $configKey);
if (empty($configKey)) {
// Entry is empty
- throw new InvalidArgumentException('Parameter "configKey" is empty', self::EXCEPTION_CONFIG_KEY_IS_EMPTY);
+ throw new InvalidArgumentException('Parameter "configKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Is it set?
//* NOISY-DEBUG: */ printf('[%s:%d]: configKey=%s - CALLED!' . PHP_EOL, __METHOD__, __LINE__, $configKey);
if (empty($configKey)) {
// Entry is empty
- throw new InvalidArgumentException('Parameter "configKey" is empty', self::EXCEPTION_CONFIG_KEY_IS_EMPTY);
+ throw new InvalidArgumentException('Parameter "configKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Convert dashes to underscore
//* NOISY-DEBUG: */ printf('[%s:%d]: configKey=%s,configValue[]=%s - CALLED!' . PHP_EOL, __METHOD__, __LINE__, $configKey, gettype($configValue));
if (empty($configKey)) {
// Entry is empty
- throw new InvalidArgumentException('Parameter "configKey" is empty', self::EXCEPTION_CONFIG_KEY_IS_EMPTY);
+ throw new InvalidArgumentException('Parameter "configKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif ((is_array($configValue)) || (is_object($configValue)) || (is_resource($configValue))) {
// These cannot be set as this is not intended for configuration values, please use FrameworkArrayObject instead.
throw new InvalidArgumentException(sprintf('configValue[]=%s for configKey=%s is not supported.', gettype($configValue), $configKey), self::EXCEPTION_CONFIG_VALUE_TYPE_UNSUPPORTED);
//* NOISY-DEBUG: */ printf('[%s:%d]: configKey=%s - CALLED!' . PHP_EOL, __METHOD__, __LINE__, $configKey);
if (empty($configKey)) {
// Entry is empty
- throw new InvalidArgumentException('Parameter "configKey" is empty', self::EXCEPTION_CONFIG_KEY_IS_EMPTY);
+ throw new InvalidArgumentException('Parameter "configKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Convert dashes to underscore
//* NOISY-DEBUG: */ printf('[%s:%d]: keyPart=%s - CALLED!' . PHP_EOL, __METHOD__, __LINE__, $keyPart);
if (empty($keyPart)) {
// Entry is empty
- throw new InvalidArgumentException('Parameter "keyPart" is empty', self::EXCEPTION_CONFIG_KEY_IS_EMPTY);
+ throw new InvalidArgumentException('Parameter "keyPart" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Construct final config key
// Import framework stuff
use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
// Import SPL stuff
use \InvalidArgumentException;
// Validate parameter
if (empty($relativePath)) {
// Should not be empty
- throw new InvalidArgumentException('Parameter "relativePath" is empty');
+ throw new InvalidArgumentException('Parameter "relativePath" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// "Register" it
//* NOISY-DEBUG: */ printf('[%s:%d] className=%s - CALLED!' . PHP_EOL, __METHOD__, __LINE__, $className);
if (empty($className)) {
// Should not be empty
- throw new InvalidArgumentException('Parameter "className" is empty');
+ throw new InvalidArgumentException('Parameter "className" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// The class name MUST be at least Tld\Domain\Project\Package\SomeFooBar so split at them
//* NOISY-DEBUG: */ printf('[%s:%d] basePath=%s,ignoreList()=%d - CALLED!' . PHP_EOL, __METHOD__, __LINE__, $basePath, count($ignoreList));
if (empty($basePath)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "basePath" is empty');
+ throw new InvalidArgumentException('Parameter "basePath" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif ($this->listCached === true) {
// Abort here
//* NOISY-DEBUG: */ printf('[%s:%d] this->listCache=true - EXIT!' . PHP_EOL, __METHOD__, __LINE__);
// Validate parameter
if (empty($className)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "className" is empty');
+ throw new InvalidArgumentException('Parameter "className" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!GenericRegistry::getRegistry()->instanceExists('debug')) {
// Init debug instance
$debugInstance = NULL;
// Check parameter
if (empty($fieldName)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "fieldName" is empty');
+ throw new InvalidArgumentException('Parameter "fieldName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// This method is deprecated
// Check parameter
if (empty($fieldName)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "fieldName" is empty');
+ throw new InvalidArgumentException('Parameter "fieldName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Get result instance
// Check parameter
if (empty($phpExtension)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "phpExtension" is empty');
+ throw new InvalidArgumentException('Parameter "phpExtension" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Is it loaded?
// Check parameter
if (empty($encodedData)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "encodedData" is empty');
+ throw new InvalidArgumentException('Parameter "encodedData" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Determine it
// Check parameter
if (empty($keyGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+ throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($subGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "subGroup" is empty');
+ throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($key)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "key" is empty');
+ throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif ($element === '') {
// Throw IAE
- throw new InvalidArgumentException('Parameter "element" is empty');
+ throw new InvalidArgumentException('Parameter "element" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Is it there?
// Check parameter
if (empty($keyGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+ throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($subGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "subGroup" is empty');
+ throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($key)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "key" is empty');
+ throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Is it there?
//* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup);
if (empty($keyGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+ throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($subGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "subGroup" is empty');
+ throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Is it there?
//* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',value=' . print_r($this->genericArray[$keyGroup][$subGroup], true));
if (empty($keyGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+ throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($subGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "subGroup" is empty');
+ throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!$this->isGenericArrayGroupSet($keyGroup, $subGroup)) {
// No, then abort here
throw new BadMethodCallException(sprintf('keyGroup=%s,subGroup=%s not found.', $keyGroup, $subGroup));
//* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key);
if (empty($keyGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+ throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($subGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "subGroup" is empty');
+ throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($key)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "key" is empty');
+ throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Remove it
//* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key . ',element=' . $element);
if (empty($keyGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+ throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($subGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "subGroup" is empty');
+ throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($key)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "key" is empty');
+ throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif ($element === '') {
// Throw IAE
- throw new InvalidArgumentException('Parameter "element" is empty');
+ throw new InvalidArgumentException('Parameter "element" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Remove it
//* NOISY-DEBUG: */ if (!is_object($value)) $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key . ',value[' . gettype($value) . ']=' . print_r($value, true) . ',appendGlue=' . $appendGlue);
if (empty($keyGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+ throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($subGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "subGroup" is empty');
+ throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($key)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "key" is empty');
+ throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Is it already there?
//* NOISY-DEBUG: */ if (!is_object($value)) $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key . ',element=' . $element . ',value[' . gettype($value) . ']=' . print_r($value, true) . ',appendGlue=' . $appendGlue);
if (empty($keyGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+ throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($subGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "subGroup" is empty');
+ throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($key)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "key" is empty');
+ throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif ($element === '') {
// Throw IAE
- throw new InvalidArgumentException('Parameter "element" is empty');
+ throw new InvalidArgumentException('Parameter "element" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Is it already there?
//* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',forceInit=' . intval($forceInit));
if (empty($keyGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+ throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($subGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "subGroup" is empty');
+ throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (($forceInit === false) && ($this->isGenericArrayGroupSet($keyGroup, $subGroup))) {
// Already initialized
throw new BadMethodCallException(sprintf('keyGroup=%s,subGroup=%s already initialized.', $keyGroup, $subGroup));
//* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key . ',forceInit=' . intval($forceInit));
if (empty($keyGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+ throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($subGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "subGroup" is empty');
+ throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($key)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "key" is empty');
+ throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (($forceInit === false) && ($this->isGenericArrayKeySet($keyGroup, $subGroup, $key))) {
// Already initialized
throw new BadMethodCallException(sprintf('keyGroup=%s,subGroup=%s,key[%s]=%s already initialized.', $keyGroup, $subGroup, gettype($key), $key));
//* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key . ',element=' . $element . ',forceInit=' . intval($forceInit));
if (empty($keyGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+ throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($subGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "subGroup" is empty');
+ throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($key)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "key" is empty');
+ throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif ($element === '') {
// Throw IAE
- throw new InvalidArgumentException('Parameter "element" is empty');
+ throw new InvalidArgumentException('Parameter "element" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (($forceInit === false) && ($this->isGenericArrayElementSet($keyGroup, $subGroup, $key, $element))) {
// Already initialized
throw new BadMethodCallException(sprintf('keyGroup=%s,subGroup=%s,key[%s]=%s,element[%s]=%s already initialized.', $keyGroup, $subGroup, gettype($key), $key, gettype($element), $element));
//* NOISY-DEBUG: */ if (!is_object($value)) $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key . ',value[' . gettype($value) . ']=' . print_r($value, true));
if (empty($keyGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+ throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($subGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "subGroup" is empty');
+ throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($key)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "key" is empty');
+ throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!$this->isGenericArrayKeySet($keyGroup, $subGroup, $key)) {
// Initialize array
$this->initGenericArrayKey($keyGroup, $subGroup, $key);
//* NOISY-DEBUG: */ if (!is_object($value)) $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key . ',element=' . $element . ',value[' . gettype($value) . ']=' . print_r($value, true));
if (empty($keyGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+ throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($subGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "subGroup" is empty');
+ throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($key)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "key" is empty');
+ throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif ($element === '') {
// Throw IAE
- throw new InvalidArgumentException('Parameter "element" is empty');
+ throw new InvalidArgumentException('Parameter "element" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!$this->isGenericArrayElementSet($keyGroup, $subGroup, $key, $element)) {
// Initialize array
$this->initGenericArrayElement($keyGroup, $subGroup, $key, $element);
//* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key);
if (empty($keyGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+ throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($subGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "subGroup" is empty');
+ throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($key)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "key" is empty');
+ throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!$this->isGenericArrayKeySet($keyGroup, $subGroup, $key)) {
// Not found
throw new BadMethodCallException(sprintf('keyGroup=%s,subGroup=%s,key[%s]=%s not found.', $keyGroup, $subGroup, gettype($key), $key));
//* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key);
if (empty($keyGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+ throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($subGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "subGroup" is empty');
+ throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($key)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "key" is empty');
+ throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!$this->isGenericArrayKeySet($keyGroup, $subGroup, $key)) {
// Not found
throw new BadMethodCallException(sprintf('keyGroup=%s,subGroup=%s,key[%s]=%s not found.', $keyGroup, $subGroup, gettype($key), $key));
//* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup);
if (empty($keyGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+ throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!isset($this->genericArray[$keyGroup])) {
// Not found
throw new BadMethodCallException(sprintf('keyGroup=%s not found.', $keyGroup));
//* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup);
if (empty($keyGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+ throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($subGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "subGroup" is empty');
+ throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!$this->isGenericArrayGroupSet($keyGroup, $subGroup)) {
// Abort here
throw new BadMethodCallException(sprintf('keyGroup=%s,subGroup=%s not found.', $keyGroup, $subGroup));
//* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key);
if (empty($keyGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+ throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($subGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "subGroup" is empty');
+ throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($key)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "key" is empty');
+ throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!$this->isGenericArrayKeySet($keyGroup, $subGroup, $key)) {
// Abort here
throw new BadMethodCallException(sprintf('keyGroup=%s,subGroup=%s,key[%s]=%s not found.', $keyGroup, $subGroup, gettype($key), $key));
//* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup);
if (empty($keyGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+ throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!isset($this->genericArray[$keyGroup])) {
// Then abort here
throw new BadMethodCallException(sprintf('keyGroup=%s not found', $keyGroup));
//* NOISY-DEBUG: */ if (!is_object($value)) $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key . ',value[' . gettype($value) . ']=' . print_r($value, true));
if (empty($keyGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+ throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($subGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "subGroup" is empty');
+ throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($key)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "key" is empty');
+ throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!$this->isValidGenericArrayGroup($keyGroup, $subGroup)) {
// Then abort here
throw new BadMethodCallException(sprintf('keyGroup=%s,subGroup=%s not found', $keyGroup));
//* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key);
if (empty($keyGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+ throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($subGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "subGroup" is empty');
+ throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($key)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "key" is empty');
+ throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!$this->isGenericArrayKeySet($keyGroup, $subGroup, $key)) {
// Then abort here
throw new BadMethodCallException(sprintf('keyGroup=%s,subGroup=%s,key[%s]=%s not found.', $keyGroup, $subGroup, gettype($key), $key));
//* NOISY-DEBUG: */ if (!is_object($value)) $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key . ',element=' . $element . ',value[' . gettype($value) . ']=' . print_r($value, true));
if (empty($keyGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+ throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($subGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "subGroup" is empty');
+ throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($key)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "key" is empty');
+ throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif ($element === '') {
// Throw IAE
- throw new InvalidArgumentException('Parameter "element" is empty');
+ throw new InvalidArgumentException('Parameter "element" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!$this->isGenericArrayElementSet($keyGroup, $subGroup, $key, $element)) {
// Initialize array
$this->initGenericArrayElement($keyGroup, $subGroup, $key, $element);
//* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key . ',element=' . $element);
if (empty($keyGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+ throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($subGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "subGroup" is empty');
+ throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($key)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "key" is empty');
+ throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif ($element === '') {
// Throw IAE
- throw new InvalidArgumentException('Parameter "element" is empty');
+ throw new InvalidArgumentException('Parameter "element" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!$this->isGenericArrayElementSet($keyGroup, $subGroup, $key, $element)) {
// Then abort here
throw new BadMethodCallException(sprintf('keyGroup=%s,subGroup=%s,key[%s]=%s,element[%s]=%s not found.', $keyGroup, $subGroup, gettype($key), $key, gettype($element), $element));
//* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup);
if (empty($keyGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+ throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($subGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "subGroup" is empty');
+ throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Determine it
//* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup . ',subGroup=' . $subGroup . ',key=' . $key);
if (empty($keyGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "keyGroup" is empty');
+ throw new InvalidArgumentException('Parameter "keyGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($subGroup)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "subGroup" is empty');
+ throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($key)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "key" is empty');
+ throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Determine it
// Import framework stuff
use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
use Org\Mxchange\CoreFramework\Criteria\Search\SearchCriteria;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
use Org\Mxchange\CoreFramework\Utils\Strings\StringUtils;
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-CRITERIA: criteriaType=%s - CALLED!', strtoupper($criteriaType), $criteriaType));
if (empty($criteriaType)) {
// Throw it again
- throw new InvalidArgumentException('Parameter "criteriaType" is empty');
+ throw new InvalidArgumentException('Parameter "criteriaType" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!in_array($criteriaType, self::$CRITERIA_TYPES)) {
// Throw it again
throw new InvalidArgumentException(sprintf('criteriaType=%s is not supported', $criteriaType));
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-CRITERIA: criteriaType=%s,criteriaKey=%s - CALLED!', strtoupper($criteriaType), $criteriaType, $criteriaKey));
if (empty($criteriaType)) {
// Throw it again
- throw new InvalidArgumentException('Parameter "criteriaType" is empty');
+ throw new InvalidArgumentException('Parameter "criteriaType" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!in_array($criteriaType, self::$CRITERIA_TYPES)) {
// Throw it again
throw new UnexpectedValueException(sprintf('criteriaType=%s is not supported', $criteriaType));
} elseif (empty($criteriaKey)) {
// Throw it again
- throw new InvalidArgumentException('Parameter "criteriaKey" is empty');
+ throw new InvalidArgumentException('Parameter "criteriaKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif ((strpos($criteriaKey, 'my-') !== false) || (strpos($criteriaKey, 'my_') !== false)) {
// Throw it again
throw new InvalidArgumentException(sprintf('criteriaKey=%s has illegal prefix "my"', $criteriaKey));
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-CRITERIA: criteriaKey=%s - CALLED!', $criteriaKey));
if (empty($criteriaKey)) {
// Throw it again
- throw new InvalidArgumentException('Parameter "criteriaKey" is empty');
+ throw new InvalidArgumentException('Parameter "criteriaKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Invoke inner method
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-CRITERIA: criteriaKey=%s - CALLED!', $criteriaKey));
if (empty($criteriaKey)) {
// Throw it again
- throw new InvalidArgumentException('Parameter "criteriaKey" is empty');
+ throw new InvalidArgumentException('Parameter "criteriaKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Invoke inner method
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-CRITERIA: criteriaType=%s - CALLED!', strtoupper($criteriaType), $criteriaType));
if (empty($criteriaType)) {
// Throw it again
- throw new InvalidArgumentException('Parameter "criteriaType" is empty');
+ throw new InvalidArgumentException('Parameter "criteriaType" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!in_array($criteriaType, self::$CRITERIA_TYPES)) {
// Throw it again
throw new UnexpectedValueException(sprintf('criteriaType=%s is not supported', $criteriaType));
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-CRITERIA: criteriaKey=%s - CALLED!', $criteriaKey));
if (empty($criteriaKey)) {
// Throw it again
- throw new InvalidArgumentException('Parameter "criteriaKey" is empty');
+ throw new InvalidArgumentException('Parameter "criteriaKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif ((strpos($criteriaKey, 'my-') !== false) || (strpos($criteriaKey, 'my_') !== false)) {
// Throw it again
throw new InvalidArgumentException(sprintf('criteriaKey=%s has illegal prefix "my"', $criteriaKey));
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-CRITERIA: criteriaKey=%s,criteriaValue[]=%s,criteriaType=%s - CALLED!', strtoupper($criteriaType), $criteriaKey, gettype($criteriaValue), $criteriaType));
if (empty($criteriaKey)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "criteriaKey" is empty');
+ throw new InvalidArgumentException('Parameter "criteriaKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif ((strpos($criteriaKey, 'my-') !== false) || (strpos($criteriaKey, 'my_') !== false)) {
// Throw it again
throw new InvalidArgumentException(sprintf('criteriaKey=%s has illegal prefix "my"', $criteriaKey));
throw new InvalidArgumentException(sprintf('value[]=%s is not supported', gettype($criteriaValue)));
} elseif (empty($criteriaType)) {
// Throw it again
- throw new InvalidArgumentException('Parameter "criteriaType" is empty');
+ throw new InvalidArgumentException('Parameter "criteriaType" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!in_array($criteriaType, self::$CRITERIA_TYPES)) {
// Throw it again
throw new UnexpectedValueException(sprintf('criteriaType=%s is not supported', $criteriaType));
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-CRITERIA: criteriaKey=%s,criteriaValue[]=%s$criteriaValue,criteriaType=%s - CALLED!', strtoupper($criteriaType), $criteriaKey, gettype($criteriaValue), $criteriaType));
if (empty($criteriaKey)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "criteriaKey" is empty');
+ throw new InvalidArgumentException('Parameter "criteriaKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif ((strpos($criteriaKey, 'my-') !== false) || (strpos($criteriaKey, 'my_') !== false)) {
// Throw it again
throw new InvalidArgumentException(sprintf('criteriaKey=%s has illegal prefix "my"', $criteriaKey));
throw new InvalidArgumentException(sprintf('value[]=%s is not supported', gettype($criteriaValue)));
} elseif (empty($criteriaType)) {
// Throw it again
- throw new InvalidArgumentException('Parameter "criteriaType" is empty');
+ throw new InvalidArgumentException('Parameter "criteriaType" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!in_array($criteriaType, self::$CRITERIA_TYPES)) {
// Throw it again
throw new UnexpectedValueException(sprintf('criteriaType=%s is not supported', $criteriaType));
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-CRITERIA: criteriaKey=%s,criteriaValue[]=%s - CALLED!', $criteriaKey, gettype($criteriaValue)));
if (empty($criteriaKey)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "criteriaKey" is empty');
+ throw new InvalidArgumentException('Parameter "criteriaKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif ((strpos($criteriaKey, 'my-') !== false) || (strpos($criteriaKey, 'my_') !== false)) {
// Throw it again
throw new InvalidArgumentException(sprintf('criteriaKey=%s has illegal prefix "my"', $criteriaKey));
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-CRITERIA: criteriaKey=%s,criteriaValue[%s]=%s - CALLED!', $criteriaKey, gettype($criteriaValue), $criteriaValue));
if (empty($criteriaKey)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "criteriaKey" is empty');
+ throw new InvalidArgumentException('Parameter "criteriaKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif ((strpos($criteriaKey, 'my-') !== false) || (strpos($criteriaKey, 'my_') !== false)) {
// Throw it again
throw new InvalidArgumentException(sprintf('criteriaKey=%s has illegal prefix "my"', $criteriaKey));
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-CRITERIA: criteriaKey=%s,configEntry=%s,criteriaType=%s - CALLED!', strtoupper($criteriaType), $criteriaKey, $configEntry, $criteriaType));
if (empty($criteriaKey)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "criteriaKey" is empty');
+ throw new InvalidArgumentException('Parameter "criteriaKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif ((strpos($criteriaKey, 'my-') !== false) || (strpos($criteriaKey, 'my_') !== false)) {
// Throw it again
throw new InvalidArgumentException(sprintf('criteriaKey=%s has illegal prefix "my"', $criteriaKey));
} elseif (empty($configEntry)) {
// Throw it again
- throw new InvalidArgumentException('Parameter "configEntry" is empty');
+ throw new InvalidArgumentException('Parameter "configEntry" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($criteriaType)) {
// Throw it again
- throw new InvalidArgumentException('Parameter "criteriaType" is empty');
+ throw new InvalidArgumentException('Parameter "criteriaType" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!in_array($criteriaType, self::$CRITERIA_TYPES)) {
// Throw it again
throw new UnexpectedValueException(sprintf('criteriaType=%s is not supported', $criteriaType));
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-CRITERIA: criteriaKey=%s,criteriaType=%s - CALLED!', strtoupper($criteriaType), $criteriaKey, $criteriaType));
if (empty($criteriaKey)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "criteriaKey" is empty');
+ throw new InvalidArgumentException('Parameter "criteriaKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif ((strpos($criteriaKey, 'my-') !== false) || (strpos($criteriaKey, 'my_') !== false)) {
// Throw it again
throw new InvalidArgumentException(sprintf('criteriaKey=%s has illegal prefix "my"', $criteriaKey));
} elseif (empty($criteriaType)) {
// Throw it again
- throw new InvalidArgumentException('Parameter "criteriaType" is empty');
+ throw new InvalidArgumentException('Parameter "criteriaType" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!in_array($criteriaType, self::$CRITERIA_TYPES)) {
// Throw it again
throw new UnexpectedValueException(sprintf('criteriaType=%s is not supported', $criteriaType));
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-CRITERIA: criteriaKey=%s - CALLED!', $criteriaKey));
if (empty($criteriaKey)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "criteriaKey" is empty');
+ throw new InvalidArgumentException('Parameter "criteriaKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif ((strpos($criteriaKey, 'my-') !== false) || (strpos($criteriaKey, 'my_') !== false)) {
// Throw it again
throw new InvalidArgumentException(sprintf('criteriaKey=%s has illegal prefix "my"', $criteriaKey));
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-CRITERIA: criteriaKey=%s - CALLED!', $criteriaKey));
if (empty($criteriaKey)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "criteriaKey" is empty');
+ throw new InvalidArgumentException('Parameter "criteriaKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif ((strpos($criteriaKey, 'my-') !== false) || (strpos($criteriaKey, 'my_') !== false)) {
// Throw it again
throw new InvalidArgumentException(sprintf('criteriaKey=%s has illegal prefix "my"', $criteriaKey));
throw new InvalidArgumentException('entryArray cannot be an empty array');
} elseif (empty($criteriaType)) {
// Throw it again
- throw new InvalidArgumentException('Parameter "criteriaType" is empty');
+ throw new InvalidArgumentException('Parameter "criteriaType" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!in_array($criteriaType, self::$CRITERIA_TYPES)) {
// Throw it again
throw new UnexpectedValueException(sprintf('criteriaType=%s is not supported', $criteriaType));
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-CRITERIA: onlyKeys()=%d,criteriaType=%s - CALLED!', strtoupper($criteriaType), count($onlyKeys), $criteriaType));
if (empty($criteriaType)) {
// Throw it again
- throw new InvalidArgumentException('Parameter "criteriaType" is empty');
+ throw new InvalidArgumentException('Parameter "criteriaType" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!in_array($criteriaType, self::$CRITERIA_TYPES)) {
// Throw it again
throw new UnexpectedValueException(sprintf('criteriaType=%s is not supported', $criteriaType));
use Org\Mxchange\CoreFramework\Criteria\Local\LocalSearchCriteria;
use Org\Mxchange\CoreFramework\Criteria\Storing\StoreableCriteria;
use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
// Import SPL stuff
use \InvalidArgumentException;
// Validate parameter
if (empty($tableName)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "tableName" is empty');
+ throw new InvalidArgumentException('Parameter "tableName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Get a new instance
use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
use Org\Mxchange\CoreFramework\Criteria\BaseCriteria;
use Org\Mxchange\CoreFramework\Criteria\Local\LocalSearchCriteria;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
// Import SPL stuff
use \InvalidArgumentException;
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('SEARCH-CRITERIA: key=%s,value[]=%s,separator=%s - CALLED!', $key, gettype($value), $separator));
if (empty($key)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "key" is empty');
+ throw new InvalidArgumentException('Parameter "key" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (is_array($value) || is_bool($value) || is_bool($value) || is_object($value) || is_resource($value)) {
// Throw it again
throw new InvalidArgumentException(sprintf('value[]=%s is not supported/valid', gettype($value)));
} elseif (empty($separator)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "separator" is empty');
+ throw new InvalidArgumentException('Parameter "separator" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// "Explode" value
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CACHED-LFDB: tableName=%s,searchInstance=%s - CALLED!', $tableName, $searchInstance->__toString()));
if (empty($tableName)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "tableName" is empty');
+ throw new InvalidArgumentException('Parameter "tableName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!isset($this->pathNames[$tableName])) {
// "Cache" is not present, so create and assign it
$this->pathNames[$tableName] = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('local_database_path') . $tableName . DIRECTORY_SEPARATOR;
// Is "cache" there?
if (empty($tableName)) {
// Should never be an empty string
- throw new UnexpectedValueException('Class field dataSetInstance->tableName is empty');
+ throw new UnexpectedValueException('Class field dataSetInstance->tableName is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!isset($this->pathNames[$tableName])) {
// "Cache" is not present, so create and assign it
$this->pathNames[$tableName] = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('local_database_path') . $tableName . DIRECTORY_SEPARATOR;
// Validate parameter
if (empty($tableName)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "tableName" is empty');
+ throw new InvalidArgumentException('Parameter "tableName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Default key is null
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CACHED-LFDB: tableName=' . $tableName . ' - CALLED!');
if (empty($tableName)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "tableName" is empty');
+ throw new InvalidArgumentException('Parameter "tableName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!isset($this->pathNames[$tableName])) {
// "Cache" is not present, so create and assign it
$this->pathNames[$tableName] = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('local_database_path') . $tableName . DIRECTORY_SEPARATOR;
// Misses an element?
if (count($resultArray) == 0) {
// Cannot be empty
- throw new InvalidArgumentException('Array "resultArray" is empty');
+ throw new InvalidArgumentException('Array "resultArray" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!array_key_exists(BaseDatabaseResult::RESULT_NAME_ROWS, $resultArray)) {
// Yes, then abort here
throw new InvalidArgumentException(sprintf('resultArray(%d)=%s has no element "%s".', count($resultArray), print_r($resultArray, TRUE), BaseDatabaseResult::RESULT_NAME_ROWS));
namespace Org\Mxchange\CoreFramework\Factory;
// Import framework stuff
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
// Import SPL stuff
// Is the parameter valid?
if (empty($fullClassName)) {
// No empty class name
- throw new InvalidArgumentException('fullClassName is empty', self::EXCEPTION_CONFIG_KEY_IS_EMPTY);
+ throw new InvalidArgumentException('fullClassName is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Count it up in total sum
// Is the parameter valid?
if (empty($fullClassName)) {
// No empty class name
- throw new InvalidArgumentException('fullClassName is empty', self::EXCEPTION_CONFIG_KEY_IS_EMPTY);
+ throw new InvalidArgumentException('fullClassName is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Return isset() result
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\BaseFactory;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
// Import SPL stuff
// If there is no handler?
if (empty($type)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "type" is empty');
+ throw new InvalidArgumentException('Parameter "type" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (GenericRegistry::getRegistry()->instanceExists($type . '_index')) {
// Get handler from registry
$indexInstance = GenericRegistry::getRegistry()->getInstance($type . '_index');
// Import framework stuff
use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
use Org\Mxchange\CoreFramework\Factory\BaseFactory;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Loader\NoClassException;
// Import SPL stuff
// Is the class name valid and is the class there?
if (empty($fullClassName)) {
// Throw an exception here
- throw new InvalidArgumentException('Parameter "fullClassName" is empty');
+ throw new InvalidArgumentException('Parameter "fullClassName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!self::isClassCounted($fullClassName) && !class_exists($fullClassName)) {
// First get an instance of this factory
$factoryInstance = new ObjectFactory();
use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
use Org\Mxchange\CoreFramework\Factory\BaseFactory;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
// Import SPL stuff
//* NOISY-DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FILE-STACK-FACTORY: prefix=%s,stackName=%s - CALLED!', $prefix, $stackName));
if (empty($prefix)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "prefix" is empty');
+ throw new InvalidArgumentException('Parameter "prefix" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($stackName)) {
// Throw it again
- throw new InvalidArgumentException('Paramter "stackName" is empty');
+ throw new InvalidArgumentException('Paramter "stackName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Construct file stack name
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\BaseFactory;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
// Import SPL stuff
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('XML-TEMPLATE-ENGINE-FACTORY: configKey=%s - CALLED!', $configKey));
if (empty($configKey)) {
// Throw IAE
- throw new InvalidArgumentException('Paramter "configKey" is empty');
+ throw new InvalidArgumentException('Paramter "configKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Do we have an instance in the registry?
// Import framework stuff
use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Loader\NoClassException;
use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
use Org\Mxchange\CoreFramework\Utils\Strings\StringUtils;
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FRAMEWORK-FEATURE: featureName=%s - CALLED!', $featureName));
if (empty($featureName)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "featureName" is empty');
+ throw new InvalidArgumentException('Parameter "featureName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Is the cache set?
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FRAMEWORK-FEATURE: featureName=%s - CALLED!', $featureName));
if (empty($featureName)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "featureName" is empty');
+ throw new InvalidArgumentException('Parameter "featureName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Is the cache set?
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
use Org\Mxchange\CoreFramework\Filesystem\File\BaseAbstractFile;
use Org\Mxchange\CoreFramework\Filesystem\FilePointer;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Traits\Index\IndexableTrait;
use Org\Mxchange\CoreFramework\Traits\Stack\StackableTrait;
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-BINARY-FILE: 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);
}
// Determine it
throw new OutOfBoundsException(sprintf('seekPosition=%d is not valid', $seekPosition));
} elseif (empty($data)) {
// Empty data is invalid, too
- throw new InvalidArgumentException('Parameter "data" is empty');
+ throw new InvalidArgumentException('Parameter "data" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Write data at given position
throw new OutOfBoundsException(sprintf('seekPosition=%d is not valid.', $seekPosition));
} elseif (empty($dataStream)) {
// Empty dataStream
- throw new InvalidArgumentException('Parameter "dataStream" is empty');
+ throw new InvalidArgumentException('Parameter "dataStream" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Call pointer's method
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-BINARY-FILE: type=%s,minimumBlockLength=%d - CALLED!', $type, $minimumBlockLength));
if (empty($type)) {
// Empty type
- throw new InvalidArgumentException('Parameter "type" is empty');
+ throw new InvalidArgumentException('Parameter "type" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif ($minimumBlockLength < 1) {
// Invalid block length
throw new InvalidArgumentException(sprintf('Parameter minimumBlockLength=%d is not valid', $minimumBlockLength));
use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
use Org\Mxchange\CoreFramework\Filesystem\File\BaseBinaryFile;
use Org\Mxchange\CoreFramework\Filesystem\Index\IndexableFile;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
use Org\Mxchange\CoreFramework\Index\Indexable;
use Org\Mxchange\CoreFramework\Utils\Crypto\CryptoUtils;
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('INDEX-FILE: type=%s - CALLED!', $type));
if (empty($type)) {
// Empty type
- throw new InvalidArgumentException('Parameter "type" is empty');
+ throw new InvalidArgumentException('Parameter "type" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!($this->getIndexInstance() instanceof Indexable)) {
// Index instance not set
throw new BadMethodCallException('this->indexInstance[] is not properly set.');
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('INDEX-FILE: stackName=%s,value[]=%s - CALLED!', $stackName, gettype($value)));
if (empty($stackName)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "stackName" is empty');
+ throw new InvalidArgumentException('Parameter "stackName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (is_object($value) || is_resource($value)) {
// Not wanted here
throw new InvalidArgumentException(sprintf('value[]=%s is not stackable in files', gettype($value)));
use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
use Org\Mxchange\CoreFramework\Filesystem\Stack\FileStacker;
use Org\Mxchange\CoreFramework\Filesystem\File\BaseBinaryFile;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
use Org\Mxchange\CoreFramework\Stack\File\StackableFile;
use Org\Mxchange\CoreFramework\Utils\Crypto\CryptoUtils;
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('STACK-FILE: type=%s - CALLED!', $type));
if (empty($type)) {
// Empty type
- throw new InvalidArgumentException('Parameter "type" is empty');
+ throw new InvalidArgumentException('Parameter "type" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!($this->getStackInstance() instanceof StackableFile) && !($this->getStackInstance() instanceof StackableFile)) {
// Index instance not set
throw new BadMethodCallException('this->stackInstance[] and this->pointerInstance are not properly set.');
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('STACK-FILE: stackName=%s,value[]=%s - CALLED!', $stackName, gettype($value)));
if (empty($stackName)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "stackName" is empty');
+ throw new InvalidArgumentException('Parameter "stackName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (is_object($value) || is_resource($value)) {
// Not wanted here
throw new InvalidArgumentException(sprintf('value[]=%s is not stackable in files', gettype($value)));
// Import framework stuff
use Org\Mxchange\CoreFramework\Filesystem\FrameworkDirectory;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Generic\NullPointerException;
use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
// Some pre-sanity checks...
if (empty($pathName)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "pathName" is empty');
+ throw new InvalidArgumentException('Parameter "pathName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!is_dir($pathName)) {
// Not a directory
throw new PathIsNoDirectoryException($pathName, self::EXCEPTION_INVALID_PATH_NAME);
use Org\Mxchange\CoreFramework\Filesystem\FileReadProtectedException;
use Org\Mxchange\CoreFramework\Filesystem\FileWriteProtectedException;
use Org\Mxchange\CoreFramework\Filesystem\PathWriteProtectedException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Generic\NullPointerException;
use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FILE-INPUT-OUTPUT-POINTER: dataStream(%d)=%s - CALLED!', strlen($dataStream), $dataStream));
if (empty($dataStream)) {
// Empty dataStream
- throw new InvalidArgumentException('Parameter "dataStream" is empty');
+ throw new InvalidArgumentException('Parameter "dataStream" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Get length
throw new OutOfBoundsException(sprintf('seekPosition=%d is not valid.', $seekPosition));
} elseif (empty($dataStream)) {
// Empty dataStream
- throw new InvalidArgumentException('Parameter "dataStream" is empty');
+ throw new InvalidArgumentException('Parameter "dataStream" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (($this->getFileSize() > 0 || $seekPosition > 0) && $this->seek($seekPosition) === -1) {
// Could not seek
throw new InvalidArgumentException(sprintf('Could not seek to seekPosition=%d', $seekPosition));
use Org\Mxchange\CoreFramework\Filesystem\BaseFileIo;
use Org\Mxchange\CoreFramework\Filesystem\FileIoException;
use Org\Mxchange\CoreFramework\Filesystem\Pointer\OutputPointer;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Generic\NullPointerException;
// Import SPL stuff
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('RAW-FILE-OUTPUT-POINTER: fileInstance=%s,mode=%s - CALLED!', $fileInstance->__toString(), $mode));
if (empty($mode)) {
// No fileInstance given
- throw new InvalidArgumentException('Parameter "mode" is empty');
+ throw new InvalidArgumentException('Parameter "mode" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Try to open a handler
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('RAW-FILE-OUTPUT-POINTER: dataStream(%d)=%s (trimmed) - CALLED!', strlen($dataStream), trim($dataStream)));
if (empty($dataStream)) {
// Empty data stream
- throw new InvalidArgumentException('Parameter "dataStream" is empty');
+ throw new InvalidArgumentException('Parameter "dataStream" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (is_null($this->getFileObject())) {
// Pointer not initialized
throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER);
use Org\Mxchange\CoreFramework\Filesystem\BaseFileIo;
use Org\Mxchange\CoreFramework\Filesystem\FileIoException;
use Org\Mxchange\CoreFramework\Filesystem\Pointer\OutputPointer;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Generic\NullPointerException;
use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('TEXT-FILE-OUTPUT-POINTER: fileInstance[%s]=%s,mode=%s - CALLED!', get_class($fileInstance), $fileInstance->__toString(), $mode));
if (empty($mode)) {
// No filename given
- throw new InvalidArgumentException('Parameter "mode" is empty');
+ throw new InvalidArgumentException('Parameter "mode" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Try to open a handler
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('TEXT-FILE-OUTPUT-POINTER: dataStream=%s - CALLED!', $dataStream));
if (empty($dataStream)) {
// Invalid parameter
- throw new InvalidArgumentException('Parameter "dataStream" is empty');
+ throw new InvalidArgumentException('Parameter "dataStream" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (is_null($this->getFileObject())) {
// Pointer not initialized
throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER);
// Import framework stuff
use Org\Mxchange\CoreFramework\Filesystem\Text\BaseInputTextFile;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Stream\Filesystem\CsvInputStreamer;
// Import SPL stuff
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] columnSeparator=%s,expectedMatches=%d - CALLED!', __METHOD__, __LINE__, $columnSeparator, $expectedMatches));
if (strlen($columnSeparator) === 0) {
// No empty column separator
- throw new InvalidArgumentException('Parameter "columnSeparator" is empty');
+ throw new InvalidArgumentException('Parameter "columnSeparator" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif ($expectedMatches < 0) {
// Below zero is not valid
throw new InvalidArgumentException(sprintf('expectedMatches=%d is below zero', $expectedMatches));
// Is the parameter valid
if (empty($taskName)) {
// Task name cannot be empty
- throw new InvalidArgumentException('Parameter "taskName" is empty');
+ throw new InvalidArgumentException('Parameter "taskName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Get interval delay, startup delay and max runs
//* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('O:'.$registryKey.'/'.$extraKey);
if (empty($registryKey)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "registryKey" is empty');
+ throw new InvalidArgumentException('Parameter "registryKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
try {
//* DEBUG: */ echo "OPEN:groupId={$groupId},content=<pre>".htmlentities($content)."</pre>\n";
if (empty($groupId)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "groupId" is empty');
+ throw new InvalidArgumentException('Parameter "groupId" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (isset($this->groups[$groupId])) {
// Then throw an exception here
throw new HelperGroupAlreadyCreatedException(array($this, $groupId), self::EXCEPTION_GROUP_ALREADY_FOUND);
// Is the group already there?
if (empty($subGroupId)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "subGroupId" is empty');
+ throw new InvalidArgumentException('Parameter "subGroupId" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (isset($this->subGroups[$subGroupId])) {
// Then throw an exception here
throw new HelperSubGroupAlreadyCreatedException(array($this, $subGroupId), self::EXCEPTION_SUB_GROUP_ALREADY_FOUND);
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
use Org\Mxchange\CoreFramework\Filesystem\File\BaseBinaryFile;
use Org\Mxchange\CoreFramework\Filesystem\File\BinaryFile;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Index\BaseIndex;
use Org\Mxchange\CoreFramework\Index\Indexable;
use Org\Mxchange\CoreFramework\Utils\Arrays\ArrayUtils;
throw new OutOfBoundsException(sprintf('seekPosition=%d is not valid.', $seekPosition));
} elseif (empty($dataStream)) {
// Empty dataStream
- throw new InvalidArgumentException('Parameter "dataStream" is empty');
+ throw new InvalidArgumentException('Parameter "dataStream" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Call iterated object's method
namespace Org\Mxchange\CoreFramework\Index\File\Stack;
// Import framework stuff
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Index\File\BaseFileIndex;
use Org\Mxchange\CoreFramework\Index\File\Stack\IndexableStack;
use Org\Mxchange\CoreFramework\Index\Indexable;
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FILE-STACK-INDEX: stackName=%s,data()=%d - CALLED!', $stackName, count($data)));
if (empty($stackName)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "stackName" is empty');
+ throw new InvalidArgumentException('Parameter "stackName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (count($data) == 0) {
// Throw it again
throw new InvalidArgumentException('Parameter "data" is an empty array');
// Import framework stuff
use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Localization\ManageableLanguage;
use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
use Org\Mxchange\CoreFramework\ObjectArray\FrameworkArrayObject;
// Is the base path valid?
if (empty($languageBasePath)) {
// Language path is empty
- throw new InvalidArgumentException('languageBasePath is still empty');
+ throw new InvalidArgumentException('languageBasePath is still empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!is_dir($languageBasePath)) {
// Is not a path
throw new InvalidArgumentException(sprintf('languageBasePath=%s not found', $languageBasePath), self::EXCEPTION_INVALID_PATH_NAME);
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-LIST: groupName=%s - CALLED!', $groupName));
if (empty($groupName)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "groupName" is empty');
+ throw new InvalidArgumentException('Parameter "groupName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Check on existence ...
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-LIST: groupName=%s - CALLED!', $groupName));
if (empty($groupName)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "groupName" is empty');
+ throw new InvalidArgumentException('Parameter "groupName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif ($this->isGroupSet($groupName)) {
// Throw the exception here
throw new BadMethodCallException(sprintf('groupName=%s is already set', $groupName), self::EXCEPTION_GROUP_ALREADY_ADDED);
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-LIST: groupName=' . $groupName . ',subGroup=' . $subGroup . ',visitableInstance=' . $visitableInstance->__toString() . ' - CALLED!');
if (empty($groupName)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "groupName" is empty');
+ throw new InvalidArgumentException('Parameter "groupName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($subGroup)) {
// Throw it again
- throw new InvalidArgumentException('Parameter "subGroup" is empty');
+ throw new InvalidArgumentException('Parameter "subGroup" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!$this->isGroupSet($groupName)) {
// Throw the exception here
throw new BadMethodCallException(sprintf('groupName=%s is not a valid group', $groupName), self::EXCEPTION_GROUP_NOT_FOUND);
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-LIST: groupName[' . gettype($groupName) . ']=' . $groupName . ' - CALLED!');
if (empty($groupName)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "groupName" is empty');
+ throw new InvalidArgumentException('Parameter "groupName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!$this->isGroupSet($groupName)) {
// Throw the exception here
throw new BadMethodCallException(sprintf('groupName=%s is not a valid group', $groupName), self::EXCEPTION_GROUP_NOT_FOUND);
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-LIST: groupName=' . $groupName . ' - CALLED!');
if (empty($groupName)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "groupName" is empty');
+ throw new InvalidArgumentException('Parameter "groupName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!$this->isGroupSet($groupName)) {
// Throw the exception here
throw new BadMethodCallException(sprintf('groupName=%s is not a valid group', $groupName), self::EXCEPTION_GROUP_NOT_FOUND);
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-LIST: groupName=' . $groupName . ' - CALLED!');
if (empty($groupName)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "groupName" is empty');
+ throw new InvalidArgumentException('Parameter "groupName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!$this->isGroupSet($groupName)) {
// Throw the exception here
throw new BadMethodCallException(sprintf('groupName=%s is not a valid group', $groupName), self::EXCEPTION_GROUP_NOT_FOUND);
// Does this group exist?
if (empty($groupName)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "groupName" is empty');
+ throw new InvalidArgumentException('Parameter "groupName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!$this->isGroupSet($groupName)) {
// Throw the exception here
throw new BadMethodCallException(sprintf('groupName=%s is not a valid group', $groupName), self::EXCEPTION_GROUP_NOT_FOUND);
// Validate parameter
if (empty($hash)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "hash" is empty');
+ throw new InvalidArgumentException('Parameter "hash" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!isset($this->cache['is_valid'][$hash])) {
// Check it
$this->cache['is_valid'][$hash] = ((in_array($hash, $this->listIndex)) && (isset($this->listEntries[$hash])));
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-LIST: groupName=%s - CALLED!', $groupName));
if (empty($groupName)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "groupName" is empty');
+ throw new InvalidArgumentException('Parameter "groupName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!$this->isGroupSet($groupName)) {
// Throw the exception here
throw new BadMethodCallException(sprintf('groupName=%s is not a valid group', $groupName), self::EXCEPTION_GROUP_NOT_FOUND);
// Is the hash valid?
if (empty($hash)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "hash" is empty');
+ throw new InvalidArgumentException('Parameter "hash" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!$this->isHashValid($hash)) {
// Throw an exception here, hashIndex is unknown at this point
throw new InvalidListHashException(array($this, $hash, -999), self::EXCEPTION_INVALID_HASH);
namespace Org\Mxchange\CoreFramework\Parser\Xml;
// Import framework stuff
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Parser\BaseParser;
use Org\Mxchange\CoreFramework\Parser\Parseable;
use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
// Convert all to UTF8
if (empty($content)) {
// No empty content
- throw new InvalidArgumentException('content is empty');
+ throw new InvalidArgumentException('content is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (function_exists('recode')) {
// Recode found, so use it
$content = recode('html..utf8', $content);
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Generic\NullPointerException;
use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
use Org\Mxchange\CoreFramework\Traits\Iterator\IteratorTrait;
// Validate parameter
if (empty($instanceKey)) {
// Throw IAE
- throw new InvalidArgumentExeption('Parameter "instanceKey" is empty');
+ throw new InvalidArgumentExeption('Parameter "instanceKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Set entry in generic array
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Resolver\BaseResolver;
use Org\Mxchange\CoreFramework\Utils\Strings\StringUtils;
// Is a action set?
if (empty($namespace)) {
// Then thrown an exception here
- throw new InvalidArgumentException('Parameter "namespace" is empty');
+ throw new InvalidArgumentException('Parameter "namespace" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($actionName)) {
// Then thrown an exception here
- throw new InvalidArgumentException('Parameter "actionName" is empty');
+ throw new InvalidArgumentException('Parameter "actionName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Create class name
// Import framework stuff
use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Request\Requestable;
// Import SPL stuff
// Is the variable $actionName set and the action is valid?
if (empty($actionName)) {
// Then thrown an exception here
- throw new InvalidArgumentException('Parameter "actionName" is empty');
+ throw new InvalidArgumentException('Parameter "actionName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif ($resolverInstance->isActionValid($actionName) === false) {
// Invalid action found
throw new InvalidActionException(array($resolverInstance, $actionName), self::EXCEPTION_INVALID_ACTION);
use Org\Mxchange\CoreFramework\Command\Commandable;
use Org\Mxchange\CoreFramework\Command\InvalidCommandException;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Resolver\BaseResolver;
use Org\Mxchange\CoreFramework\Utils\Strings\StringUtils;
// Is a action set?
if (empty($namespace)) {
// Then thrown an exception here
- throw new InvalidArgumentException('Parameter "namespace" is empty');
+ throw new InvalidArgumentException('Parameter "namespace" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($commandName)) {
// Then thrown an exception here
- throw new InvalidArgumentException('Parameter "commandName" is empty');
+ throw new InvalidArgumentException('Parameter "commandName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Initiate the instance variable
// Is namespace and command name set?
if (empty($namespace)) {
// Then thrown an exception here
- throw new InvalidArgumentException('Parameter "namespace" is empty');
+ throw new InvalidArgumentException('Parameter "namespace" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($commandName)) {
// Then thrown an exception here
- throw new InvalidArgumentException('Parameter "commandName" is empty');
+ throw new InvalidArgumentException('Parameter "commandName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// By default nothing shall be valid
// Import framework stuff
use Org\Mxchange\CoreFramework\Command\BaseCommand;
use Org\Mxchange\CoreFramework\Command\InvalidCommandException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
// Import SPL stuff
// Is the variable $commandName set and the command is valid?
if (empty($namespace)) {
// Then thrown an exception here
- throw new InvalidArgumentException('Parameter "namespace" is empty');
+ throw new InvalidArgumentException('Parameter "namespace" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($commandName)) {
// Then thrown an exception here
- throw new InvalidArgumentException('Parameter "commandName" is empty');
+ throw new InvalidArgumentException('Parameter "commandName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!$resolverInstance->isCommandValid($namespace, $commandName)) {
// Invalid command found
throw new InvalidCommandException(array($resolverInstance, $commandName), self::EXCEPTION_INVALID_COMMAND);
// Import framework stuff
use Org\Mxchange\CoreFramework\Command\InvalidCommandException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
// Import SPL stuff
// Is the variable $commandName set and the command is valid?
if (empty($commandName)) {
// Then thrown an exception here
- throw new InvalidArgumentException('Parameter "commandName" is empty');
+ throw new InvalidArgumentException('Parameter "commandName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif ($resolverInstance->isCommandValid($commandName) === false) {
// Invalid command found
// @TODO Missing namespace!
// Import framework stuff
use Org\Mxchange\CoreFramework\Command\InvalidCommandException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
// Import SPL stuff
// Is the variable $commandName set and the command is valid?
if (empty($commandName)) {
// Then thrown an exception here
- throw new InvalidArgumentException('Parameter "commandName" is empty');
+ throw new InvalidArgumentException('Parameter "commandName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif ($resolverInstance->isCommandValid($commandName) === false) {
// @TODO Missing namespace!
// Invalid command found
use Org\Mxchange\CoreFramework\Controller\DefaultControllerException;
use Org\Mxchange\CoreFramework\Controller\InvalidControllerException;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
use Org\Mxchange\CoreFramework\Resolver\BaseResolver;
// Is a action set?
if (empty($namespace)) {
// Then thrown an exception here
- throw new InvalidArgumentException('Parameter "namespace" is empty');
+ throw new InvalidArgumentException('Parameter "namespace" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($controllerName)) {
// Then thrown an exception here
- throw new InvalidArgumentException('Parameter "controllerName" is empty');
+ throw new InvalidArgumentException('Parameter "controllerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// By default nothing shall be valid
// Import framework stuff
use Org\Mxchange\CoreFramework\Controller\BaseController;
use Org\Mxchange\CoreFramework\Controller\InvalidControllerException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Resolver\Controller\ControllerResolver;
use Org\Mxchange\CoreFramework\Resolver\Controller\BaseControllerResolver;
// Is the variable $controllerName set and the controller is valid?
if (empty($namespace)) {
// Then thrown an exception here
- throw new InvalidArgumentException('Parameter "namespace" is empty');
+ throw new InvalidArgumentException('Parameter "namespace" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($controllerName)) {
// Then thrown an exception here
- throw new InvalidArgumentException('Parameter "controllerName" is empty');
+ throw new InvalidArgumentException('Parameter "controllerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif ($resolverInstance->isControllerValid($namespace, $controllerName) === false) {
// Invalid controller found
throw new InvalidControllerException(array($resolverInstance, $controllerName), self::EXCEPTION_INVALID_CONTROLLER);
// Import framework stuff
use Org\Mxchange\CoreFramework\Controller\BaseController;
use Org\Mxchange\CoreFramework\Controller\InvalidControllerException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Resolver\Controller\ControllerResolver;
use Org\Mxchange\CoreFramework\Resolver\Controller\BaseControllerResolver;
// Are all parameter set and the controller is valid?
if (empty($namespace)) {
// Then thrown an exception here
- throw new InvalidArgumentException('Parameter "namespace" is empty');
+ throw new InvalidArgumentException('Parameter "namespace" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($controllerName)) {
// Then thrown an exception here
- throw new InvalidArgumentException('Parameter "controllerName" is empty');
+ throw new InvalidArgumentException('Parameter "controllerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif ($resolverInstance->isControllerValid($namespace, $controllerName) === false) {
// Invalid controller found
throw new InvalidControllerException(array($resolverInstance, $controllerName), self::EXCEPTION_INVALID_CONTROLLER);
// Import framework stuff
use Org\Mxchange\CoreFramework\Controller\BaseController;
use Org\Mxchange\CoreFramework\Controller\InvalidControllerException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Resolver\Controller\ControllerResolver;
use Org\Mxchange\CoreFramework\Resolver\Controller\BaseControllerResolver;
// Are all parameter set and the controller is valid?
if (empty($namespace)) {
// Then thrown an exception here
- throw new InvalidArgumentException('Parameter "namespace" is empty');
+ throw new InvalidArgumentException('Parameter "namespace" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($controllerName)) {
// Then thrown an exception here
- throw new InvalidArgumentException('Parameter "controllerName" is empty');
+ throw new InvalidArgumentException('Parameter "controllerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif ($resolverInstance->isControllerValid($namespace, $controllerName) === false) {
// Invalid controller found
throw new InvalidControllerException(array($resolverInstance, $controllerName), self::EXCEPTION_INVALID_CONTROLLER);
// 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__)->debugOutput(sprintf('BASE-STACKER: stackerName=%s,forceReInit=%d - CALLED!', $stackerName, intval($forceReInit)));
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);
} elseif (($forceReInit === false) && ($this->isStackInitialized($stackerName))) {
// Then throw the exception
throw new BadMethodCallException(array($this, $stackerName, $forceReInit), self::EXCEPTION_STACKER_ALREADY_INITIALIZED);
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-STACKER: stacks()=%d,forceReInit=%d - CALLED!', count($stacks), intval($forceReInit)));
if (count($stacks) == 0) {
// No empty stack name
- throw new InvalidArgumentException('Array "stacks" is empty');
+ throw new InvalidArgumentException('Array "stacks" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// "Walk" through all (more will be added as needed
//* 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);
}
// Is is there?
//* 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);
} elseif (!$this->isStackInitialized($stackerName)) {
// Throw an exception
throw new BadMethodCallException(sprintf('stackerName=%s not yet initialized but method called.', $stackerName), self::EXCEPTION_NO_STACKER_FOUND);
//* 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);
} elseif (!$this->isStackInitialized($stackerName)) {
// Throw an exception
throw new BadMethodCallException(sprintf('stackerName=%s not yet initialized but method called.', $stackerName), self::EXCEPTION_NO_STACKER_FOUND);
//* 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);
} elseif (!$this->isStackInitialized($stackerName)) {
// Throw an exception
throw new BadMethodCallException(sprintf('stackerName=%s not yet initialized but method called.', $stackerName), self::EXCEPTION_NO_STACKER_FOUND);
//* 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);
} elseif (!$this->isStackInitialized($stackerName)) {
// Throw an exception
throw new BadMethodCallException(sprintf('stackerName=%s not yet initialized but method called.', $stackerName), self::EXCEPTION_NO_STACKER_FOUND);
//* 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);
} elseif (!$this->isStackInitialized($stackerName)) {
// Throw an exception
throw new BadMethodCallException(sprintf('stackerName=%s not yet initialized but method called.', $stackerName), self::EXCEPTION_NO_STACKER_FOUND);
//* 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);
} elseif (!$this->isStackInitialized($stackerName)) {
// Throw an exception
throw new BadMethodCallException(sprintf('stackerName=%s not yet initialized but method called.', $stackerName), self::EXCEPTION_NO_STACKER_FOUND);
//* 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);
} elseif (!$this->isStackInitialized($stackerName)) {
// Throw an exception
throw new BadMethodCallException(sprintf('stackerName=%s not yet initialized but method called.', $stackerName), self::EXCEPTION_NO_STACKER_FOUND);
//* 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);
} elseif (!$this->isStackInitialized($stackerName)) {
// Throw an exception
throw new BadMethodCallException(sprintf('stackerName=%s not yet initialized but method called.', $stackerName), self::EXCEPTION_NO_STACKER_FOUND);
// Own namespace
namespace Org\Mxchange\CoreFramework\Stack;
+// Import framework-specific stuff
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
+
// Import SPL stuff
use \InvalidArgumentException;
//* 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: 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: 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
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
use Org\Mxchange\CoreFramework\Filesystem\File\BaseBinaryFile;
use Org\Mxchange\CoreFramework\Filesystem\File\BinaryFile;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
use Org\Mxchange\CoreFramework\Stack\BaseStacker;
use Org\Mxchange\CoreFramework\Traits\Index\IndexableTrait;
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-STACK: fileInfoInstance[%s]=%s,type=%s - CALLED!', get_class($fileInfoInstance), $fileInfoInstance, $type));
if (empty($type)) {
// Invalid parameter
- throw new InvalidArgumentException('Parameter "type" is empty');
+ throw new InvalidArgumentException('Parameter "type" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Get a stack file instance
//* PRINTR-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-STACK: stackerName=%s,value[%s]=%s', $stackerName, gettype($value), print_r($value, true)));
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);
} elseif ($this->isStackFull($stackerName)) {
// Stacker is full
throw new FullStackerException([$this, $stackerName, $value], self::EXCEPTION_STACKER_IS_FULL);
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-STACK: 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);
} elseif ($this->isStackEmpty($stackerName)) {
// Throw an exception
throw new BadMethodCallException([$this, $stackerName], self::EXCEPTION_STACKER_IS_EMPTY);
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-STACK: 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);
} elseif ($this->isStackEmpty($stackerName)) {
// Throw an exception
throw new BadMethodCallException([$this, $stackerName], self::EXCEPTION_STACKER_IS_EMPTY);
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-STACK: 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);
} elseif ($this->isStackEmpty($stackerName)) {
// Throw an exception
throw new BadMethodCallException([$this, $stackerName], self::EXCEPTION_STACKER_IS_EMPTY);
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-STACK: 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);
} elseif ($this->isStackEmpty($stackerName)) {
// Throw an exception
throw new BadMethodCallException([$this, $stackerName], self::EXCEPTION_STACKER_IS_EMPTY);
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-STACK: 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);
}
// @TODO Please implement this, returning false
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-STACK: 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);
}
// So, is the stack empty?
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-STACK: stackName=%s,hash{}=0x%s,encoded()=%d - CALLED!', $stackName, bin2hex($hash), strlen($encoded)));
if (empty($stackName)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "stackName" is empty');
+ throw new InvalidArgumentException('Parameter "stackName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($hash)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "hash" is empty');
+ throw new InvalidArgumentException('Parameter "hash" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (empty($encoded)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "encoded" is empty');
+ throw new InvalidArgumentException('Parameter "encoded" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Raw data been written to the file
// Import framework stuff
use Org\Mxchange\CoreFramework\Filesystem\Block\CalculatableBlock;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Registry\Registerable;
use Org\Mxchange\CoreFramework\Stack\File\BaseFileStack;
use Org\Mxchange\CoreFramework\Stack\File\StackableFile;
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FIFO-FILE-STACK: fileInfoInstance[%s]=%s,type=%s - CALLED!', get_class($fileInfoInstance), $fileInfoInstance, $type));
if (empty($type)) {
// No empty type
- throw new InvalidArgumentException('Parameter "type" is empty');
+ throw new InvalidArgumentException('Parameter "type" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Get new instance
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FIFO-FILE-STACK: 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);
} elseif (is_object($value) || is_resource($value)) {
// Those types for $value are not allowed
throw new InvalidArgumentException(sprintf('value[]=%s is not valid', gettype($value)));
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FIFO-FILE-STACK: 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('FIFO-FILE-STACK: 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
// Own namespace
namespace Org\Mxchange\CoreFramework\Stack;
+// Import framework-specific stuff
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
+
/**
* A FiLo Stacker class
*
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FILO-FILE-STACK: 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('FILO-FILE-STACK: 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('FILO-FILE-STACK: 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
use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
use Org\Mxchange\CoreFramework\Filesystem\FileNotFoundException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Generic\NullPointerException;
use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
use Org\Mxchange\CoreFramework\Manager\ManageableApplication;
// Validate parameter
if (empty($variableName)) {
// Throw an exception
- throw new InvalidArgumentException('Parameter "variableName" is empty');
+ throw new InvalidArgumentException('Parameter "variableName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Replace all dashes to underscores to match variables with configuration entries
use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
use Org\Mxchange\CoreFramework\Factory\Template\XmlTemplateEngineFactory;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-XML-TEMPLATE-ENGINE: key=%s - CALLED!', $key));
if (empty($key)) {
// Throw exception
- throw new InvalidArgumentException('Parameter key is empty');
+ throw new InvalidArgumentException('Parameter key is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Read the variable
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
use Org\Mxchange\CoreFramework\Filesystem\FileNotFoundException;
use Org\Mxchange\CoreFramework\Generic\FrameworkException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
use Org\Mxchange\CoreFramework\Socket\InvalidSocketException;
// Validate parameter
if (empty($host)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "host" is empty');
+ throw new InvalidArgumentException('Parameter "host" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif ($port < 1) {
// Throw IAE
throw new InvalidArgumentException(sprintf('port=%d is not valid', $port));
// Validate parameter
if (empty($rawData)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "rawData" is empty');
+ throw new InvalidArgumentException('Parameter "rawData" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Default is invalid
// Validate parameter
if (empty($hostname)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "hostname" is empty');
+ throw new InvalidArgumentException('Parameter "hostname" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (self::$quietResolver !== TRUE) {
// Debug message
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:] Host name to resolve is: %s',
namespace Org\Mxchange\CoreFramework\User\Guest;
// Import framework stuff
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Manager\Guest\ManageableGuest;
use Org\Mxchange\CoreFramework\Registry\Registerable;
use Org\Mxchange\CoreFramework\Request\Requestable;
// Check parameter
if (empty($userName)) {
// Throw IAE
- throw new InvalidArgumentException('Paramter "userName" is empty');
+ throw new InvalidArgumentException('Paramter "userName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Get a new instance
// Check parameter
if (empty($email)) {
// Throw IAE
- throw new InvalidArgumentException('Paramter "email" is empty');
+ throw new InvalidArgumentException('Paramter "email" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Get a new instance
use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
use Org\Mxchange\CoreFramework\Database\Frontend\User\UserDatabaseFrontend;
use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Manager\Login\ManageableMember;
use Org\Mxchange\CoreFramework\Registry\Registerable;
use Org\Mxchange\CoreFramework\User\BaseUser;
// Check parameter
if (empty($userName)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "userName" is empty');
+ throw new InvalidArgumentException('Parameter "userName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Get a new instance
// Check parameter
if (empty($email)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "email" is empty');
+ throw new InvalidArgumentException('Parameter "email" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Get a new instance
// Import framework stuff
use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
// Import SPL stuff
// Validate parameters
if (count($numericArray) == 0) {
// Throw IAE
- throw new InvalidArgumentException('Array "numericArray" is empty');
+ throw new InvalidArgumentException('Array "numericArray" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (count($mapping) == 0) {
// Throw it again
- throw new InvalidArgumentException('Array "mapping" is empty');
+ throw new InvalidArgumentException('Array "mapping" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (count($numericArray) != count($mapping)) {
// Throw it yet again
throw new InvalidArgumentException(sprintf('numericArray()=%d does not match mapping()=%d', count($numericArray), count($mapping)));
// 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__)->debugOutput(sprintf('CRYPTO-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);
} elseif (!extension_loaded('hash')) {
// Should be there
throw new LogicException('Extension ext-hash not loaded');
// Import framework stuff
use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
use Org\Mxchange\CoreFramework\Configuration\FrameworkConfiguration;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Generic\NullPointerException;
use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
// Validate parameter
if (empty($str)) {
// Entry is empty
- throw new InvalidArgumentException('Parameter "str" is empty');
+ throw new InvalidArgumentException('Parameter "str" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Convert them all
//* NOISY-DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('STRING-UTILS: str=%s - CALLED!', $str));
if (empty($str)) {
// No empty strings, please
- throw new InvalidArgumentException('Parameter "str" is empty', self::EXCEPTION_CONFIG_KEY_IS_EMPTY);
+ throw new InvalidArgumentException('Parameter "str" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif (!isset(self::$cache[$str])) {
// Init class name
$className = '';
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
interface FrameworkInterface {
+ // Exception constants
+ const EXCEPTION_INVALID_ARGUMENT = 0x200;
+
/**
* Getter for field name
*
use Org\Mxchange\CoreFramework\Criteria\Criteria;
use Org\Mxchange\CoreFramework\Criteria\Storing\StoreableCriteria;
use Org\Mxchange\CoreFramework\Database\Backend\DatabaseBackend;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Registry\Registerable;
use Org\Mxchange\CoreFramework\Middleware\BaseMiddleware;
use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware;
// Validate parameter
if (empty($tableName)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "tableName" is empty');
+ throw new InvalidArgumentException('Parameter "tableName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Connect to the database
// Validate parameter
if (empty($tableName)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "tableName" is empty');
+ throw new InvalidArgumentException('Parameter "tableName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Connect to the database
// Validate parameter
if (empty($tableName)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "tableName" is empty');
+ throw new InvalidArgumentException('Parameter "tableName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
}
// Connect to the database
// Import framework stuff
use Org\Mxchange\CoreFramework\Command\InvalidCommandException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Resolver\Command\BaseCommandResolver;
use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
// Is the variable $commandName set and the command is valid?
if (empty($commandName)) {
// Then thrown an exception here
- throw new InvalidArgumentException('Parameter "commandName" is empty');
+ throw new InvalidArgumentException('Parameter "commandName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif ($resolverInstance->isCommandValid('Org\Mxchange\CoreFramework\Tests\Command', $commandName) === false) {
// Invalid command found
throw new InvalidCommandException(array($resolverInstance, $commandName), self::EXCEPTION_INVALID_COMMAND);
use Org\Mxchange\CoreFramework\Controller\BaseController;
use Org\Mxchange\CoreFramework\Controller\Controller;
use Org\Mxchange\CoreFramework\Controller\InvalidControllerException;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Resolver\Controller\BaseControllerResolver;
use Org\Mxchange\CoreFramework\Resolver\Controller\ControllerResolver;
// Is the variable $controllerName set and the command is valid?
if (empty($controllerName)) {
// Then thrown an exception here
- throw new InvalidArgumentException('Parameter "controllerName" is empty');
+ throw new InvalidArgumentException('Parameter "controllerName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
} elseif ($resolverInstance->isControllerValid('Org\Mxchange\CoreFramework\Tests\Controller', $controllerName) === false) {
// Invalid command found
throw new InvalidControllerException(array($resolverInstance, $controllerName), self::EXCEPTION_INVALID_CONTROLLER);