use Org\Mxchange\CoreFramework\Configuration\NoConfigEntryException;
use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
-use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
use Org\Mxchange\CoreFramework\Registry\Registerable;
use Org\Mxchange\CoreFramework\Utils\Strings\StringUtils;
* @see ClassLoader
* @author Roland Haeder <webmaster@shipsimu.org>
* @version 1.0.1
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2022 Core Developer Team
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2023 Core Developer Team
* @license GNU GPL 3.0 or any newer version
* @link http://www.shipsimu.org
*
}
// Convert dashes to underscore
- $configKey = StringUtils::convertDashesToUnderscores($configKey);
+ $configKey = str_replace('-', '_', $configKey);
// Is a valid configuration key provided?
//* NOISY-DEBUG: */ printf('[%s:%d]: configKey=%s - AFTER!' . PHP_EOL, __METHOD__, __LINE__, $configKey);
}
// Cast to string
- $configKey = StringUtils::convertDashesToUnderscores($configKey);
+ $configKey = str_replace('-', '_', $configKey);
// Set the configuration value
//* NOISY-DEBUG: */ printf('[%s:%d]: Setting configKey=%s,configValue[%s]=%s - EXIT!' . PHP_EOL, __METHOD__, __LINE__, $configKey, gettype($configValue), $configValue);
}
// Convert dashes to underscore
- $configKey = StringUtils::convertDashesToUnderscores($configKey);
+ $configKey = str_replace('-', '_', $configKey);
// Is the configuration key there?
//* NOISY-DEBUG: */ printf('[%s:%d]: configKey=%s - AFTER!' . PHP_EOL, __METHOD__, __LINE__, $configKey);
//* NOISY-DEBUG: */ printf('[%s:%d]: isEnabled[]=%s' . PHP_EOL, __METHOD__, __LINE__, gettype($isEnabled));
if (!is_bool($isEnabled)) {
// Throw exception
- throw new UnexpectedValueException(sprintf('isEnabled[]=%s is unexpected', gettype($isEnabled)));
+ throw new UnexpectedValueException(sprintf('isEnabled[]=%s is unexpected', gettype($isEnabled)), FrameworkInterface::EXCEPTION_UNEXPECTED_VALUE);
}
// Return it
*/
public final function getField (string $fieldName) {
// The super interface "FrameworkInterface" requires this
- throw new UnsupportedOperationException([$this, __FUNCTION__], BaseFrameworkSystem::EXCEPTION_UNSPPORTED_OPERATION);
+ throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION);
}
/**
*/
public function isFieldSet (string $fieldName) {
// The super interface "FrameworkInterface" requires this
- throw new UnsupportedOperationException([$this, __FUNCTION__], BaseFrameworkSystem::EXCEPTION_UNSPPORTED_OPERATION);
+ throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION);
}
}