// 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;
}
} else {
// Are debug times enabled?
- if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('debug_' . FrameworkBootstrap::getRequestTypeFromSystem() . '_output_timings') == 'Y') {
+ if (FrameworkBootstrap::getConfigurationInstance()->isEnabled('debug_' . FrameworkBootstrap::getRequestTypeFromSystem() . '_output_timings')) {
// Prepent it
$message = $this->getPrintableExecutionTime() . $message;
}
// 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
* @return $isset Whether the given key is set
* @throws InvalidArgumentException If a parameter is not valid
*/
- protected final function isGenericArrayElementSet (string $keyGroup, string $subGroup, $key, $element) {
+ protected final function isGenericArrayElementSet (string $keyGroup, string $subGroup, string $key, string $element) {
// 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');
- } elseif (empty($element)) {
+ 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?
* @return $isset Whether the given key is set
* @throws InvalidArgumentException If a parameter is not valid
*/
- protected final function isGenericArrayKeySet (string $keyGroup, string $subGroup, $key) {
+ protected final function isGenericArrayKeySet (string $keyGroup, string $subGroup, string $key) {
// 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));
* @return void
* @throws InvalidArgumentException If a parameter is not valid
*/
- protected final function unsetGenericArrayKey (string $keyGroup, string $subGroup, $key) {
+ protected final function unsetGenericArrayKey (string $keyGroup, string $subGroup, string $key) {
// Check parameter
//* 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
* @return void
* @throws InvalidArgumentException If a parameter is not valid
*/
- protected final function unsetGenericArrayElement (string $keyGroup, string $subGroup, $key, $element) {
+ protected final function unsetGenericArrayElement (string $keyGroup, string $subGroup, string $key, string $element) {
// Check parameter
//* 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');
- } elseif (empty($element)) {
+ 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?
* @return void
* @throws InvalidArgumentException If a parameter is not valid
*/
- protected final function appendStringToGenericArrayElement (string $keyGroup, string $subGroup, $key, $element, string $value, string $appendGlue = '') {
+ protected final function appendStringToGenericArrayElement (string $keyGroup, string $subGroup, string $key, string $element, string $value, string $appendGlue = '') {
// Check parameter
//* 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');
- } elseif (empty($element)) {
+ 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?
$this->genericArray[$keyGroup][$subGroup][$key][$element] .= $appendGlue . $value;
} else {
// Add it
- $this->setStringGenericArrayElement($keyGroup, $subGroup, $key, $element, $value);
+ $this->setGenericArrayElement($keyGroup, $subGroup, $key, $element, $value);
}
}
//* 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));
* @throws InvalidArgumentException If a parameter is not valid
* @throws BadMethodCallException If key/sub group isn't there but this method is invoked
*/
- protected final function initGenericArrayElement (string $keyGroup, string $subGroup, $key, $element, bool $forceInit = false) {
+ protected final function initGenericArrayElement (string $keyGroup, string $subGroup, string $key, string $element, bool $forceInit = false) {
// Check parameter
//* 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');
- } elseif (empty($element)) {
+ 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));
* @return $count Number of array elements
* @throws InvalidArgumentException If a parameter is not valid
*/
- protected final function pushValueToGenericArrayKey (string $keyGroup, string $subGroup, $key, $value) {
+ protected final function pushValueToGenericArrayKey (string $keyGroup, string $subGroup, string $key, $value) {
// Check parameter
//* 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);
* @return $count Number of array elements
* @throws InvalidArgumentException If a parameter is not valid
*/
- protected final function pushValueToGenericArrayElement (string $keyGroup, string $subGroup, $key, $element, $value) {
+ protected final function pushValueToGenericArrayElement (string $keyGroup, string $subGroup, string $key, string $element, $value) {
// Check parameter
//* 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');
- } elseif (empty($element)) {
+ 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);
* @throws InvalidArgumentException If a parameter is not valid
* @throws BadMethodCallException If key/sub group isn't there but this method is invoked
*/
- protected final function popGenericArrayElement (string $keyGroup, string $subGroup, $key) {
+ protected final function popGenericArrayElement (string $keyGroup, string $subGroup, string $key) {
// Check parameter
//* 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));
* @throws InvalidArgumentException If a parameter is not valid
* @throws BadMethodCallException If key/sub group isn't there but this method is invoked
*/
- protected final function shiftGenericArrayElement (string $keyGroup, string $subGroup, $key) {
+ protected final function shiftGenericArrayElement (string $keyGroup, string $subGroup, string $key) {
// Check parameter
//* 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));
* @throws InvalidArgumentException If a parameter is not valid
* @throws BadMethodCallException If key/sub group isn't there but this method is invoked
*/
- protected final function countGenericArrayElements (string $keyGroup, string $subGroup, $key) {
+ protected final function countGenericArrayElements (string $keyGroup, string $subGroup, string $key) {
// Check parameter
//* 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));
* @throws InvalidArgumentException If a parameter is not valid
* @throws BadMethodCallException If key/sub group isn't there but this method is invoked
*/
- protected final function setGenericArrayKey (string $keyGroup, string $subGroup, $key, $value) {
+ protected final function setGenericArrayKey (string $keyGroup, string $subGroup, string $key, $value) {
// Check parameters
//* 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));
* @throws InvalidArgumentException If a parameter is not valid
* @throws BadMethodCallException If key/sub group isn't there but this method is invoked
*/
- protected final function getGenericArrayKey (string $keyGroup, string $subGroup, $key) {
+ protected final function getGenericArrayKey (string $keyGroup, string $subGroup, string $key) {
// Check parameters
//* 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));
* @return void
* @throws InvalidArgumentException If a parameter is not valid
*/
- protected final function setGenericArrayElement (string $keyGroup, string $subGroup, $key, $element, $value) {
+ protected final function setGenericArrayElement (string $keyGroup, string $subGroup, string $key, string $element, $value) {
// Check parameter
//* 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');
- } elseif (empty($element)) {
+ 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);
* @throws InvalidArgumentException If a parameter is not valid
* @throws BadMethodCallException If key/sub group isn't there but this method is invoked
*/
- protected final function getGenericArrayElement (string $keyGroup, string $subGroup, $key, $element) {
+ protected final function getGenericArrayElement (string $keyGroup, string $subGroup, string $key, string $element) {
// Check parameter
//* 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');
- } elseif (empty($element)) {
+ 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
* @param $key Key to check
* @return $isValid Whether given sub group is valid
*/
- protected final function isValidGenericArrayKey (string $keyGroup, string $subGroup, $key) {
+ protected final function isValidGenericArrayKey (string $keyGroup, string $subGroup, string $key) {
// Check parameters
//* 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