From: Roland Häder Date: Sat, 18 Feb 2023 00:03:09 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=28344124341dcbd6d7c48c573c7ef8f60de7d3e6;p=core.git Continued: - also turned 'quiet_resolver' into a is_*_enabled entry --- diff --git a/framework/config-global.php b/framework/config-global.php index 4ff43989..4c2a729d 100644 --- a/framework/config-global.php +++ b/framework/config-global.php @@ -448,9 +448,6 @@ $cfg->setConfigEntry('extension_uuid_loaded', false); // CFG: REGISTRY-ITERATOR-CLASS $cfg->setConfigEntry('registry_iterator_class', 'Org\Mxchange\CoreFramework\Iterator\Registry\RegistryIterator'); -// CFG: QUIET-DNS-RESOLVER -$cfg->setConfigEntry('quiet_dns_resolver', false); - // CFG: THOUSANDS-SEPARATOR $cfg->setConfigEntry('thousands_separator', '.'); @@ -522,3 +519,6 @@ $cfg->setConfigEntry('is_crypt_fixed_salt_enabled', false); // CFG: IS-DB-UPDATE-PRIMARY-FORCED-ENABLED $cfg->setConfigEntry('is_db_update_primary_forced_enabled', true); + +// CFG: IS-QUIET-DNS-RESOLVER-ENABLED +$cfg->setConfigEntry('is_quiet_dns_resolver_enabled', false); diff --git a/framework/main/classes/tools/console/class_ConsoleTools.php b/framework/main/classes/tools/console/class_ConsoleTools.php index 5d33e69c..c39193ce 100644 --- a/framework/main/classes/tools/console/class_ConsoleTools.php +++ b/framework/main/classes/tools/console/class_ConsoleTools.php @@ -45,7 +45,7 @@ class ConsoleTools extends BaseFrameworkSystem { /** * Default is that this class is noisy */ - private static $quietResolver = FALSE; + private static $isQuietResolver = FALSE; /** * Protected constructor @@ -57,7 +57,7 @@ class ConsoleTools extends BaseFrameworkSystem { parent::__construct(__CLASS__); // Cache configuration entry - self::$quietResolver = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('quiet_dns_resolver'); + self::$isQuietResolver = FrameworkBootstrap::getConfigurationInstance()->isEnabled('quiet_dns_resolver'); } /** @@ -216,7 +216,7 @@ class ConsoleTools extends BaseFrameworkSystem { if (empty($hostname)) { // Throw IAE throw new InvalidArgumentException('Parameter "hostname" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT); - } elseif (self::$quietResolver !== TRUE) { + } elseif (self::$isQuietResolver !== TRUE) { // Debug message self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:] Host name to resolve is: %s', __CLASS__, @@ -249,7 +249,7 @@ class ConsoleTools extends BaseFrameworkSystem { $ipAddress = $ipResolved; // Quiet? - if (self::$quietResolver !== TRUE) { + if (self::$isQuietResolver !== TRUE) { // Debug message self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:] Resolved IP address is: %s', __CLASS__, diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 9e12404c..bba9cad0 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -44,4 +44,4 @@ if (extension_loaded('xdebug')) { require dirname(__DIR__) . '/vendor/autoload.php'; // Quiet DNS resolver as this is not wanted here -FrameworkBootstrap::getConfigurationInstance()->setConfigEntry('quiet_dns_resolver', TRUE); +FrameworkBootstrap::getConfigurationInstance()->setConfigEntry('is_quiet_dns_resolver_enabled', TRUE);