From 78c80d535ab3e108f8c89f2aae9ebe02270e4d63 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 7 Nov 2020 13:50:56 +0100 Subject: [PATCH] Continued: - BaseFrameworkSystem->ConfigInstance() was deprecated and no longer working since below rewrite happened. It was also slow and unneccessary as FrameworkBootstrap::getConfigurationInstance() does the same - moved $registryInstance and getter/setter to RegistryIterator (only place) - moved $commandName / $controllerName and getter/setter to proper resolver classes MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../classes/class_BaseFrameworkSystem.php | 109 +----------------- .../classes/client/http/class_HttpClient.php | 7 +- .../html/class_HtmlLoginAreaCommand.php | 3 +- .../html/class_HtmlResendLinkCommand.php | 3 +- .../classes/criteria/class_BaseCriteria.php | 3 +- .../criteria/search/class_SearchCriteria.php | 3 +- .../classes/crypto/class_CryptoHelper.php | 11 +- .../class_CachedLocalFileDatabase.php | 11 +- .../database/class_BaseDatabaseWrapper.php | 16 +-- .../factories/cache/class_CacheFactory.php | 3 +- .../factories/html/class_HtmlNewsFactory.php | 3 +- .../binary/class_BaseBinaryFile.php | 5 +- .../filter/auth/class_UserAuthFilter.php | 9 +- .../crypto/class_CaptchaEncryptFilter.php | 3 +- .../guest/class_UserNameIsGuestFilter.php | 7 +- .../class_UserStatusConfimedUpdateFilter.php | 3 +- .../validator/class_EmailValidatorFilter.php | 5 +- .../class_UserNameValidatorFilter.php | 3 +- ...ass_GraphicalCodeCaptchaVerifierFilter.php | 3 +- .../class_UserGuestVerifierFilter.php | 3 +- .../verifier/class_UserNameVerifierFilter.php | 3 +- .../class_UserStatusVerifierFilter.php | 3 +- .../class_UserUnconfirmedVerifierFilter.php | 3 +- .../handler/tasks/class_TaskHandler.php | 7 +- .../web/class_GraphicalCodeCaptcha.php | 7 +- .../html/blocks/class_HtmlBlockHelper.php | 3 +- .../html/forms/class_HtmlFormHelper.php | 45 ++++---- .../html/links/class_HtmlLinkHelper.php | 2 +- .../registry/class_RegistryIterator.php | 24 ++++ .../classes/language/class_LanguageSystem.php | 2 +- .../main/classes/mailer/class_BaseMailer.php | 3 +- .../main/classes/menu/class_BaseMenu.php | 2 +- .../console/class_DebugConsoleOutput.php | 2 +- .../classes/output/web/class_WebOutput.php | 2 +- .../main/classes/points/class_UserPoints.php | 3 +- .../action/html/class_HtmlActionResolver.php | 5 +- .../classes/resolver/class_BaseResolver.php | 12 +- .../command/class_BaseCommandResolver.php | 28 ++++- .../class_BaseControllerResolver.php | 29 ++++- .../classes/response/class_BaseResponse.php | 5 +- .../response/html/class_HtmlResponse.php | 11 +- .../response/image/class_ImageResponse.php | 13 ++- .../rng/class_RandomNumberGenerator.php | 12 +- .../classes/stacker/class_BaseStacker.php | 3 +- .../classes/tasks/idle/class_IdleLoopTask.php | 3 +- .../template/class_BaseTemplateEngine.php | 20 ++-- .../console/class_ConsoleTemplateEngine.php | 9 +- .../html/class_HtmlTemplateEngine.php | 9 +- .../image/class_ImageTemplateEngine.php | 13 ++- .../mail/class_MailTemplateEngine.php | 9 +- .../menu/class_MenuTemplateEngine.php | 13 ++- .../tools/console/class_ConsoleTools.php | 14 +-- .../main/classes/user/class_BaseUser.php | 5 +- .../main/classes/user/member/class_Member.php | 3 +- .../class_EncryptInvalidLengthException.php | 3 +- .../compressor/class_CompressorChannel.php | 5 +- ...TestConfigurationLoadableClassesFilter.php | 3 +- 57 files changed, 283 insertions(+), 268 deletions(-) diff --git a/framework/main/classes/class_BaseFrameworkSystem.php b/framework/main/classes/class_BaseFrameworkSystem.php index 88168c53..725b1034 100644 --- a/framework/main/classes/class_BaseFrameworkSystem.php +++ b/framework/main/classes/class_BaseFrameworkSystem.php @@ -5,7 +5,6 @@ namespace Org\Mxchange\CoreFramework\Object; // Import framework stuff use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Compressor\Compressor; -use Org\Mxchange\CoreFramework\Configuration\FrameworkConfiguration; use Org\Mxchange\CoreFramework\Connection\Database\DatabaseConnection; use Org\Mxchange\CoreFramework\Criteria\Criteria; use Org\Mxchange\CoreFramework\Criteria\Local\LocalSearchCriteria; @@ -35,7 +34,6 @@ use Org\Mxchange\CoreFramework\Middleware\Compressor\CompressorChannel; use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware; use Org\Mxchange\CoreFramework\Parser\Parseable; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; -use Org\Mxchange\CoreFramework\Registry\Register; use Org\Mxchange\CoreFramework\Result\Database\CachedDatabaseResult; use Org\Mxchange\CoreFramework\Result\Search\SearchableResult; use Org\Mxchange\CoreFramework\Stacker\Stackable; @@ -229,11 +227,6 @@ abstract class BaseFrameworkSystem extends stdClass implements FrameworkInterfac */ private $stateInstance = NULL; - /** - * Registry instance (implementing Register) - */ - private $registryInstance = NULL; - /** * Call-back instance */ @@ -254,16 +247,6 @@ abstract class BaseFrameworkSystem extends stdClass implements FrameworkInterfac */ private $genericArray = array(); - /** - * Command name - */ - private $commandName = ''; - - /** - * Controller name - */ - private $controllerName = ''; - /** * Array with bitmasks and such for pack/unpack methods to support both * 32-bit and 64-bit systems @@ -420,12 +403,6 @@ abstract class BaseFrameworkSystem extends stdClass implements FrameworkInterfac // Set real class $this->setRealClass($className); - // Set configuration instance if no registry ... - if (!$this instanceof Register) { - // ... because registries doesn't need to be configured - $this->setConfigInstance(FrameworkBootstrap::getConfigurationInstance()); - } // END - if - // Is the startup time set? (0 cannot be true anymore) if (self::$startupTime == 0) { // Then set it @@ -738,27 +715,6 @@ abstract class BaseFrameworkSystem extends stdClass implements FrameworkInterfac return $this->updateInstance; } - /** - * Setter for language instance - * - * @param $configInstance The configuration instance which shall - * be FrameworkConfiguration - * @return void - */ - public final function setConfigInstance (FrameworkConfiguration $configInstance) { - GenericRegistry::getRegistry()->addInstance('config', $configInstance); - } - - /** - * Getter for configuration instance - * - * @return $configInstance Configuration instance - */ - public final function getConfigInstance () { - $configInstance = GenericRegistry::getRegistry()->getInstance('config'); - return $configInstance; - } - /** * Setter for debug instance * @@ -1300,25 +1256,6 @@ abstract class BaseFrameworkSystem extends stdClass implements FrameworkInterfac return $this->outputInstance; } - /** - * Setter for registry instance - * - * @param $registryInstance An instance of a Register class - * @return void - */ - protected final function setRegistryInstance (Register $registryInstance) { - $this->registryInstance = $registryInstance; - } - - /** - * Getter for registry instance - * - * @return $registryInstance The debug registry instance - */ - public final function getRegistryInstance () { - return $this->registryInstance; - } - /** * Setter for call-back instance * @@ -1338,44 +1275,6 @@ abstract class BaseFrameworkSystem extends stdClass implements FrameworkInterfac return $this->callbackInstance; } - /** - * Setter for command name - * - * @param $commandName Last validated command name - * @return void - */ - protected final function setCommandName ($commandName) { - $this->commandName = $commandName; - } - - /** - * Getter for command name - * - * @return $commandName Last validated command name - */ - protected final function getCommandName () { - return $this->commandName; - } - - /** - * Setter for controller name - * - * @param $controllerName Last validated controller name - * @return void - */ - protected final function setControllerName ($controllerName) { - $this->controllerName = $controllerName; - } - - /** - * Getter for controller name - * - * @return $controllerName Last validated controller name - */ - protected final function getControllerName () { - return $this->controllerName; - } - /** * Checks whether an object equals this object. You should overwrite this * method to implement own equality checks @@ -1701,7 +1600,7 @@ Loaded includes: } // END - if } else { // Are debug times enabled? - if ($this->getConfigInstance()->getConfigEntry('debug_' . FrameworkBootstrap::getRequestTypeFromSystem() . '_output_timings') == 'Y') { + if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('debug_' . FrameworkBootstrap::getRequestTypeFromSystem() . '_output_timings') == 'Y') { // Prepent it $message = $this->getPrintableExecutionTime() . $message; } // END - if @@ -1802,7 +1701,7 @@ Loaded includes: $timeArray = explode(':', $dateTime[1]); // Construct the timestamp - $readable = sprintf($this->getConfigInstance()->getConfigEntry('german_date_time'), + $readable = sprintf(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('german_date_time'), $dateArray[0], $dateArray[1], $dateArray[2], @@ -1832,11 +1731,11 @@ Loaded includes: // Generate it from config and localize dependencies switch ($this->getLanguageInstance()->getLanguageCode()) { case 'de': // German format is a bit different to default - $localized = number_format($value, $this->getConfigInstance()->getConfigEntry('decimals'), ',', '.'); + $localized = number_format($value, FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('decimals'), ',', '.'); break; default: // US, etc. - $localized = number_format($value, $this->getConfigInstance()->getConfigEntry('decimals'), '.', ','); + $localized = number_format($value, FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('decimals'), '.', ','); break; } // END - switch diff --git a/framework/main/classes/client/http/class_HttpClient.php b/framework/main/classes/client/http/class_HttpClient.php index 61c59b82..a1b26093 100644 --- a/framework/main/classes/client/http/class_HttpClient.php +++ b/framework/main/classes/client/http/class_HttpClient.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Client\Http; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Client\BaseClient; use Org\Mxchange\CoreFramework\Client\Client; @@ -72,7 +73,7 @@ class HttpClient extends BaseClient implements Client { // Do we have cache? if (!isset($GLOBALS[__METHOD__])) { // Determine it - $GLOBALS[__METHOD__] = (($this->getConfigInstance()->getConfigEntry('proxy_host') != '') && ($this->getConfigInstance()->getConfigEntry('proxy_port') > 0)); + $GLOBALS[__METHOD__] = ((FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('proxy_host') != '') && (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('proxy_port') > 0)); } // END - if // Return cache @@ -117,9 +118,9 @@ class HttpClient extends BaseClient implements Client { $rawRequest .= 'Host: ' . $host . ':' . $port . self::HTTP_EOL; // Use login data to proxy? (username at least) - if ($this->getConfigInstance()->getConfigEntry('proxy_username') != '') { + if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('proxy_username') != '') { // Add it as well - $encodedAuth = base64_encode($this->getConfigInstance()->getConfigEntry('proxy_username') . ':' . $this->getConfigInstance()->getConfigEntry('proxy_password')); + $encodedAuth = base64_encode(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('proxy_username') . ':' . FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('proxy_password')); $rawRequest .= 'Proxy-Authorization: Basic ' . $encodedAuth . self::HTTP_EOL; } // END - if diff --git a/framework/main/classes/commands/html/class_HtmlLoginAreaCommand.php b/framework/main/classes/commands/html/class_HtmlLoginAreaCommand.php index f0035813..0adfc32b 100644 --- a/framework/main/classes/commands/html/class_HtmlLoginAreaCommand.php +++ b/framework/main/classes/commands/html/class_HtmlLoginAreaCommand.php @@ -4,6 +4,7 @@ namespace Org\Mxchange\CoreFramework\Command\Login; // Import framework stuff use Org\Mxchange\CoreFramework\Action\PerformableAction; +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Command\BaseCommand; use Org\Mxchange\CoreFramework\Command\Commandable; use Org\Mxchange\CoreFramework\Controller\Controller; @@ -186,7 +187,7 @@ class HtmlLoginAreaCommand extends BaseCommand implements Commandable { $applicationInstance = $registryInstance->getInstance('application'); // Default action is the one from configuration - $this->actionName = StringUtils::convertDashesToUnderscores($applicationInstance->getAppShortName()) . '_login_' . $this->getConfigInstance()->getConfigEntry('login_default_action'); + $this->actionName = StringUtils::convertDashesToUnderscores($applicationInstance->getAppShortName()) . '_login_' . FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('login_default_action'); // Get "action" from request $actReq = $requestInstance->getRequestElement('action'); diff --git a/framework/main/classes/commands/html/class_HtmlResendLinkCommand.php b/framework/main/classes/commands/html/class_HtmlResendLinkCommand.php index d11c7cf8..db4c6877 100644 --- a/framework/main/classes/commands/html/class_HtmlResendLinkCommand.php +++ b/framework/main/classes/commands/html/class_HtmlResendLinkCommand.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Command\Guest; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Command\BaseCommand; use Org\Mxchange\CoreFramework\Command\Commandable; use Org\Mxchange\CoreFramework\Controller\Controller; @@ -93,7 +94,7 @@ class HtmlResendLinkCommand extends BaseCommand implements Commandable { $userInstance->updateDatabaseField(UserDatabaseWrapper::DB_COLUMN_CONFIRM_HASH, $hashedString); // Re-set config entry to mailer engine - $this->getConfigInstance()->setConfigEntry('html_template_class', $this->getConfigInstance()->getConfigEntry('mail_template_class')); + FrameworkBootstrap::getConfigurationInstance()->setConfigEntry('html_template_class', FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('mail_template_class')); // Prepare the template engine $templateInstance = $this->prepareTemplateInstance($applicationInstance); diff --git a/framework/main/classes/criteria/class_BaseCriteria.php b/framework/main/classes/criteria/class_BaseCriteria.php index 57287b5b..3a75071d 100644 --- a/framework/main/classes/criteria/class_BaseCriteria.php +++ b/framework/main/classes/criteria/class_BaseCriteria.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Criteria; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Criteria\Search\SearchCriteria; use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem; use Org\Mxchange\CoreFramework\String\Utils\StringUtils; @@ -253,7 +254,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria { */ public final function addConfiguredCriteria ($criteriaKey, $configEntry, $criteriaType = 'default') { // Add the configuration entry as a criteria - $value = $this->getConfigInstance()->getConfigEntry($configEntry); + $value = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry($configEntry); $this->addCriteria($criteriaKey, $value, $criteriaType); } diff --git a/framework/main/classes/criteria/search/class_SearchCriteria.php b/framework/main/classes/criteria/search/class_SearchCriteria.php index f2fabf21..6f9f2aa5 100644 --- a/framework/main/classes/criteria/search/class_SearchCriteria.php +++ b/framework/main/classes/criteria/search/class_SearchCriteria.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Criteria\Search; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Criteria\BaseCriteria; use Org\Mxchange\CoreFramework\Criteria\Local\LocalSearchCriteria; @@ -88,7 +89,7 @@ class SearchCriteria extends BaseCriteria implements LocalSearchCriteria { */ public final function setConfiguredLimit ($configEntry) { // Get the limit from config entry and set it - $limit = $this->getConfigInstance()->getConfigEntry($configEntry); + $limit = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry($configEntry); $this->setLimit($limit); } diff --git a/framework/main/classes/crypto/class_CryptoHelper.php b/framework/main/classes/crypto/class_CryptoHelper.php index 8ac7435e..96eb2f9d 100644 --- a/framework/main/classes/crypto/class_CryptoHelper.php +++ b/framework/main/classes/crypto/class_CryptoHelper.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Helper\Crypto; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Crypto\Cryptable; use Org\Mxchange\CoreFramework\Factory\ObjectFactory; use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem; @@ -138,7 +139,7 @@ class CryptoHelper extends BaseFrameworkSystem implements Cryptable { $randomString = $this->getRngInstance()->randomString() . $this->createUuid(); // Get config entry for salt length - $length = $this->getConfigInstance()->getConfigEntry('salt_length'); + $length = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('salt_length'); // Keep only defined number of characters $this->salt = substr(sha1($randomString), -$length, $length); @@ -155,7 +156,7 @@ class CryptoHelper extends BaseFrameworkSystem implements Cryptable { $uuid = ''; // Is the UUID extension loaded and enabled? (see pecl) - if ($this->getConfigInstance()->getConfigEntry('extension_uuid_loaded') === true) { + if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('extension_uuid_loaded') === true) { // Then add it as well $uuid = uuid_create(); } // END - if @@ -185,7 +186,7 @@ class CryptoHelper extends BaseFrameworkSystem implements Cryptable { // Is the old password set? if (!empty($oldHash)) { // Use the salt from hash, first get length - $length = $this->getConfigInstance()->getConfigEntry('salt_length'); + $length = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('salt_length'); // Then extract the X first characters from the hash as our salt $salt = substr($oldHash, 0, $length); @@ -195,14 +196,14 @@ class CryptoHelper extends BaseFrameworkSystem implements Cryptable { //* DEBUG: */ echo "salt=".$salt."/plain=".$str."
\n"; if ($withFixed === true) { // Use additional fixed salt - $hashed = $salt . md5(sprintf($this->getConfigInstance()->getConfigEntry('hash_extra_mask'), + $hashed = $salt . md5(sprintf(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('hash_extra_mask'), $salt, $this->getRngInstance()->getFixedSalt(), $str )); } else { // Use salt+string to hash - $hashed = $salt . md5(sprintf($this->getConfigInstance()->getConfigEntry('hash_normal_mask'), + $hashed = $salt . md5(sprintf(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('hash_normal_mask'), $salt, $str )); diff --git a/framework/main/classes/database/backend/lfdb_legacy/class_CachedLocalFileDatabase.php b/framework/main/classes/database/backend/lfdb_legacy/class_CachedLocalFileDatabase.php index be670d26..91aa9ac5 100644 --- a/framework/main/classes/database/backend/lfdb_legacy/class_CachedLocalFileDatabase.php +++ b/framework/main/classes/database/backend/lfdb_legacy/class_CachedLocalFileDatabase.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Database\Backend\Lfdb; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Criteria\Criteria; use Org\Mxchange\CoreFramework\Criteria\Local\LocalSearchCriteria; use Org\Mxchange\CoreFramework\Criteria\Storing\StoreableCriteria; @@ -274,7 +275,7 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac */ private function generateFileFromDataSet (Criteria $dataSetInstance, string $rowName) { // Instanciate new file object - $infoInstance = new SplFileInfo($this->getConfigInstance()->getConfigEntry('local_database_path') . $dataSetInstance->getTableName() . DIRECTORY_SEPARATOR . $rowName . '.' . $this->getFileExtension()); + $infoInstance = new SplFileInfo(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('local_database_path') . $dataSetInstance->getTableName() . DIRECTORY_SEPARATOR . $rowName . '.' . $this->getFileExtension()); // Return it return $infoInstance; @@ -343,7 +344,7 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac // Then create the info file //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CACHED-LFDB: Creating info table for tableName=%s ...', $tableName)); $this->createTableInfoFile($dataSetInstance); - } elseif (($this->getConfigInstance()->getConfigEntry('db_update_primary_forced') == 'Y') && ($dataSetInstance->getPrimaryKey() != $this->tableInfo[$tableName]['primary'])) { + } elseif ((FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('db_update_primary_forced') == 'Y') && ($dataSetInstance->getPrimaryKey() != $this->tableInfo[$tableName]['primary'])) { // Set the array element //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CACHED-LFDB: Setting primaryKey=%s for tableName=%s ...', $dataSetInstance->getPrimaryKey(), $tableName)); $this->tableInfo[$tableName]['primary'] = $dataSetInstance->getPrimaryKey(); @@ -382,7 +383,7 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac $resultData = NULL; // Create full path name - $pathName = $this->getConfigInstance()->getConfigEntry('local_database_path') . $tableName . DIRECTORY_SEPARATOR; + $pathName = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('local_database_path') . $tableName . DIRECTORY_SEPARATOR; /* * A 'select' query is not that easy on local files, so first try to @@ -543,7 +544,7 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac */ public function queryUpdateDataSet (StoreableCriteria $dataSetInstance) { // Create full path name - $pathName = $this->getConfigInstance()->getConfigEntry('local_database_path') . $dataSetInstance->getTableName() . DIRECTORY_SEPARATOR; + $pathName = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('local_database_path') . $dataSetInstance->getTableName() . DIRECTORY_SEPARATOR; // Try all the requests try { @@ -692,7 +693,7 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CACHED-LFDB: tableName=' . $tableName . ' - CALLED!'); // Create full path name - $pathName = $this->getConfigInstance()->getConfigEntry('local_database_path') . $tableName . DIRECTORY_SEPARATOR; + $pathName = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('local_database_path') . $tableName . DIRECTORY_SEPARATOR; // Try all the requests try { diff --git a/framework/main/classes/database/class_BaseDatabaseWrapper.php b/framework/main/classes/database/class_BaseDatabaseWrapper.php index 7a55a482..f9414067 100644 --- a/framework/main/classes/database/class_BaseDatabaseWrapper.php +++ b/framework/main/classes/database/class_BaseDatabaseWrapper.php @@ -63,7 +63,7 @@ abstract class BaseDatabaseWrapper extends BaseFrameworkSystem { */ private final function initCacheInstance () { // Is the cache enabled? - if ($this->getConfigInstance()->getConfigEntry('database_cache_enabled') === true) { + if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('database_cache_enabled') === true) { // Set the new instance $this->cacheInstance = CacheFactory::getFactory()->createConfiguredCache(); } // END - if @@ -101,7 +101,7 @@ abstract class BaseDatabaseWrapper extends BaseFrameworkSystem { $cacheKey = NULL; // Is cache enabled? - if ($this->getConfigInstance()->getConfigEntry('database_cache_enabled') === true) { + if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('database_cache_enabled') === true) { // First get a key suitable for our cache and extend it with this class name $cacheKey = $this->getCacheKeyByCriteria($dataSetInstance, $onlyKeys); //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-WRAPPER: Using cache key ' . $cacheKey . ' for purging ...'); @@ -109,7 +109,7 @@ abstract class BaseDatabaseWrapper extends BaseFrameworkSystem { // Does this key exists in cache? //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-WRAPPER: cacheKey[%s]=%s', gettype($cacheKey), $cacheKey)); - if (($this->getConfigInstance()->getConfigEntry('database_cache_enabled') === true) && ($this->cacheInstance->offsetExists($cacheKey))) { + if ((FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('database_cache_enabled') === true) && ($this->cacheInstance->offsetExists($cacheKey))) { // Purge the cache //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-WRAPPER: Calling this->cacheInstance->purgeOffset(%s) ...', $cacheKey)); $this->cacheInstance->purgeOffset($cacheKey); @@ -134,14 +134,14 @@ abstract class BaseDatabaseWrapper extends BaseFrameworkSystem { $cacheKey = NULL; // Is cache enabled? - if ($this->getConfigInstance()->getConfigEntry('database_cache_enabled') === true) { + if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('database_cache_enabled') === true) { // First get a key suitable for our cache and extend it with this class name $cacheKey = $this->getCacheKeyByCriteria($dataSetInstance, $onlyKeys); //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-WRAPPER: Using cache key ' . $cacheKey . ' for purging ...'); } // END - if // Does this key exists in cache? - if (($this->getConfigInstance()->getConfigEntry('database_cache_enabled') === true) && ($this->cacheInstance->offsetExists($cacheKey))) { + if ((FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('database_cache_enabled') === true) && ($this->cacheInstance->offsetExists($cacheKey))) { // Purge the cache $this->cacheInstance->purgeOffset($cacheKey); } // END - if @@ -183,14 +183,14 @@ abstract class BaseDatabaseWrapper extends BaseFrameworkSystem { $result = array(); // Is the cache enabled? - if ($this->getConfigInstance()->getConfigEntry('database_cache_enabled') === true) { + if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('database_cache_enabled') === true) { // First get a key suitable for our cache and extend it with this class name $cacheKey = $this->getCacheKeyByCriteria($criteriaInstance, $onlyKeys); } // END - if // Does this key exists in cache? //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-WRAPPER: cacheKey[%s]=%s', gettype($cacheKey), $cacheKey)); - if (($this->getConfigInstance()->getConfigEntry('database_cache_enabled') === true) && ($this->cacheInstance->offsetExists($cacheKey, BaseDatabaseBackend::RESULT_INDEX_ROWS, 1))) { + if ((FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('database_cache_enabled') === true) && ($this->cacheInstance->offsetExists($cacheKey, BaseDatabaseBackend::RESULT_INDEX_ROWS, 1))) { // Then use this result //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-WRAPPER: Cache used for cacheKey=%s', $cacheKey)); $result = $this->cacheInstance->offsetGet($cacheKey); @@ -203,7 +203,7 @@ abstract class BaseDatabaseWrapper extends BaseFrameworkSystem { //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-WRAPPER: result[]=%s', gettype($result))); if (!is_null($result)) { // Is cache enabled? - if ($this->getConfigInstance()->getConfigEntry('database_cache_enabled') === true) { + if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('database_cache_enabled') === true) { // A valid result has returned from the database layer //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-WRAPPER: Setting cacheKey=%s with result()=%d entries', $cacheKey, count($result))); $this->cacheInstance->offsetSet($cacheKey, $result); diff --git a/framework/main/classes/factories/cache/class_CacheFactory.php b/framework/main/classes/factories/cache/class_CacheFactory.php index 84347653..45877c4d 100644 --- a/framework/main/classes/factories/cache/class_CacheFactory.php +++ b/framework/main/classes/factories/cache/class_CacheFactory.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Factory\Cache; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Factory\BaseFactory; use Org\Mxchange\CoreFramework\Factory\ObjectFactory; @@ -67,7 +68,7 @@ class CacheFactory extends BaseFactory { */ public function createConfiguredCache () { // Read the config entry - $cacheType = $this->getConfigInstance()->getConfigEntry('cache_class'); + $cacheType = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('cache_class'); // And get a new instance $cacheInstance = ObjectFactory::createObjectByName($cacheType); diff --git a/framework/main/classes/factories/html/class_HtmlNewsFactory.php b/framework/main/classes/factories/html/class_HtmlNewsFactory.php index fb203701..da522134 100644 --- a/framework/main/classes/factories/html/class_HtmlNewsFactory.php +++ b/framework/main/classes/factories/html/class_HtmlNewsFactory.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Factory\News; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Factory\BaseFactory; use Org\Mxchange\CoreFramework\Factory\ObjectFactory; use Org\Mxchange\CoreFramework\Request\Requestable; @@ -70,7 +71,7 @@ class HtmlNewsFactory extends BaseFactory { } // END - if // Get the news reader class name from config - $className = $requestInstance->getConfigInstance()->getConfigEntry($configEntry); + $className = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry($configEntry); // Once we have that name, try to load initialize it $newsInstance = ObjectFactory::createObjectByName($className, array($requestInstance)); diff --git a/framework/main/classes/file_directories/binary/class_BaseBinaryFile.php b/framework/main/classes/file_directories/binary/class_BaseBinaryFile.php index 202fe8fd..238c3930 100644 --- a/framework/main/classes/file_directories/binary/class_BaseBinaryFile.php +++ b/framework/main/classes/file_directories/binary/class_BaseBinaryFile.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Filesystem\File; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Factory\ObjectFactory; use Org\Mxchange\CoreFramework\Filesystem\Block; use Org\Mxchange\CoreFramework\Filesystem\Block\CalculatableBlock; @@ -539,7 +540,7 @@ abstract class BaseBinaryFile extends BaseAbstractFile { //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] CALLED!', __METHOD__, __LINE__)); // Is it enabled? - if ($this->getConfigInstance()->getConfigEntry($type . '_pre_allocate_enabled') != 'Y') { + if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry($type . '_pre_allocate_enabled') != 'Y') { // Not enabled self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] Not pre-allocating file.', __METHOD__, __LINE__)); @@ -555,7 +556,7 @@ abstract class BaseBinaryFile extends BaseAbstractFile { //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] minLengthEntry=%s', __METHOD__, __LINE__, $minLengthEntry)); // Calulcate seek position - $seekPosition = $minLengthEntry * $this->getConfigInstance()->getConfigEntry($type . '_pre_allocate_count'); + $seekPosition = $minLengthEntry * FrameworkBootstrap::getConfigurationInstance()->getConfigEntry($type . '_pre_allocate_count'); //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] seekPosition=%s', __METHOD__, __LINE__, $seekPosition)); // Now simply write a NUL there. This will pre-allocate the file. diff --git a/framework/main/classes/filter/auth/class_UserAuthFilter.php b/framework/main/classes/filter/auth/class_UserAuthFilter.php index 180ac93e..a7f0631b 100644 --- a/framework/main/classes/filter/auth/class_UserAuthFilter.php +++ b/framework/main/classes/filter/auth/class_UserAuthFilter.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Filter\User\Auth; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Factory\ObjectFactory; use Org\Mxchange\CoreFramework\Filter\BaseFilter; use Org\Mxchange\CoreFramework\Filter\Filterable; @@ -75,7 +76,7 @@ class UserAuthFilter extends BaseFilter implements Filterable { * @return void */ protected function setDefaultAuthMethod () { - $this->authMethod = $this->getConfigInstance()->getConfigEntry('auth_method_class'); + $this->authMethod = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('auth_method_class'); } /** @@ -112,13 +113,13 @@ class UserAuthFilter extends BaseFilter implements Filterable { } // END - if // Regular user account - $className = $this->getConfigInstance()->getConfigEntry('user_class'); + $className = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('user_class'); $methodName = 'createMemberByUserName'; // Now, try to get a user or guest instance - if ($authLogin == $this->getConfigInstance()->getConfigEntry('guest_login_user')) { + if ($authLogin == FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('guest_login_user')) { // Set class - $className = $this->getConfigInstance()->getConfigEntry('guest_class'); + $className = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('guest_class'); $methodName = 'createGuestByUserName'; } // END - if diff --git a/framework/main/classes/filter/crypto/class_CaptchaEncryptFilter.php b/framework/main/classes/filter/crypto/class_CaptchaEncryptFilter.php index bf21b9b5..98871b8f 100644 --- a/framework/main/classes/filter/crypto/class_CaptchaEncryptFilter.php +++ b/framework/main/classes/filter/crypto/class_CaptchaEncryptFilter.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Filter\Captcha; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Factory\ObjectFactory; use Org\Mxchange\CoreFramework\Filter\BaseFilter; use Org\Mxchange\CoreFramework\Filter\Filterable; @@ -84,7 +85,7 @@ class CaptchaEncryptFilter extends BaseFilter implements Filterable { $decryptedString = ObjectFactory::createObjectByConfiguredName('crypto_class')->decryptString($encryptDecoded); // Is it the expected length? - if (strlen($decryptedString) != $this->getConfigInstance()->getConfigEntry('captcha_string_length')) { + if (strlen($decryptedString) != FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('captcha_string_length')) { // Not found, so request is invalid $requestInstance->requestIsValid(false); diff --git a/framework/main/classes/filter/guest/class_UserNameIsGuestFilter.php b/framework/main/classes/filter/guest/class_UserNameIsGuestFilter.php index 0136b3a6..890f56f4 100644 --- a/framework/main/classes/filter/guest/class_UserNameIsGuestFilter.php +++ b/framework/main/classes/filter/guest/class_UserNameIsGuestFilter.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Filter\User\Username; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Filter\BaseFilter; use Org\Mxchange\CoreFramework\Filter\Filterable; use Org\Mxchange\CoreFramework\Request\Requestable; @@ -67,10 +68,10 @@ class UserNameIsGuestFilter extends BaseFilter implements Filterable { $userName = $requestInstance->getRequestElement('username'); // Does the user name match the guest login? - if ($userName == $this->getConfigInstance()->getConfigEntry('guest_login_user')) { + if ($userName == FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('guest_login_user')) { // Then set the password to the configured password - $requestInstance->setRequestElement('pass1', $this->getConfigInstance()->getConfigEntry('guest_login_passwd')); - $requestInstance->setRequestElement('pass2', $this->getConfigInstance()->getConfigEntry('guest_login_passwd')); + $requestInstance->setRequestElement('pass1', FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('guest_login_passwd')); + $requestInstance->setRequestElement('pass2', FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('guest_login_passwd')); } // END - if } diff --git a/framework/main/classes/filter/update/class_UserStatusConfimedUpdateFilter.php b/framework/main/classes/filter/update/class_UserStatusConfimedUpdateFilter.php index cb94e5df..8eb0cb60 100644 --- a/framework/main/classes/filter/update/class_UserStatusConfimedUpdateFilter.php +++ b/framework/main/classes/filter/update/class_UserStatusConfimedUpdateFilter.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Filter\User\Status; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Database\Frontend\User\UserDatabaseWrapper; use Org\Mxchange\CoreFramework\Filter\BaseFilter; use Org\Mxchange\CoreFramework\Filter\Filterable; @@ -68,7 +69,7 @@ class UserStatusConfimedUpdateFilter extends BaseFilter implements Filterable { $userInstance = GenericRegistry::getRegistry()->getInstance('user'); // Get "confirmed" status from config - $confirmed = $this->getConfigInstance()->getConfigEntry('user_status_confirmed'); + $confirmed = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('user_status_confirmed'); // Update the user status to "confirmed" here $userInstance->updateDatabaseField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS, $confirmed); diff --git a/framework/main/classes/filter/validator/class_EmailValidatorFilter.php b/framework/main/classes/filter/validator/class_EmailValidatorFilter.php index 3c0aad9f..4f4ae4d0 100644 --- a/framework/main/classes/filter/validator/class_EmailValidatorFilter.php +++ b/framework/main/classes/filter/validator/class_EmailValidatorFilter.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Filter\Validator\Email; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Filter\BaseFilter; use Org\Mxchange\CoreFramework\Filter\Chain\FilterChainException; use Org\Mxchange\CoreFramework\Filter\Filterable; @@ -72,7 +73,7 @@ class EmailValidatorFilter extends BaseFilter implements Filterable { $email = $requestInstance->getRequestElement('email'); // Is the Email set? - if ((is_null($email)) || ($this->getConfigInstance()->getConfigEntry('register_email_unique') == 'Y')) { + if ((is_null($email)) || (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('register_email_unique') == 'Y')) { // Try it again $email1 = $requestInstance->getRequestElement('email1'); $email2 = $requestInstance->getRequestElement('email2'); @@ -159,7 +160,7 @@ class EmailValidatorFilter extends BaseFilter implements Filterable { $userInstance->setEmailAddress($email); } else { // If this instance is created then the username *does* exist - $userInstance = call_user_func_array(array($this->getConfigInstance()->getConfigEntry('user_class'), 'createMemberByEmail'), array($email)); + $userInstance = call_user_func_array(array(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('user_class'), 'createMemberByEmail'), array($email)); // Remember this user instance in our registry for later usage $registry->addInstance('user', $userInstance); diff --git a/framework/main/classes/filter/validator/class_UserNameValidatorFilter.php b/framework/main/classes/filter/validator/class_UserNameValidatorFilter.php index e576d094..29190408 100644 --- a/framework/main/classes/filter/validator/class_UserNameValidatorFilter.php +++ b/framework/main/classes/filter/validator/class_UserNameValidatorFilter.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Filter\Validator\Username; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Filter\BaseFilter; use Org\Mxchange\CoreFramework\Filter\Chain\FilterChainException; use Org\Mxchange\CoreFramework\Filter\Filterable; @@ -127,7 +128,7 @@ class UserNameValidatorFilter extends BaseFilter implements Filterable { // If this instance is created then the username *does* exist try { // Get a new instance - $userInstance = call_user_func_array(array($this->getConfigInstance()->getConfigEntry('user_class'), 'createMemberByUsername'), array($userName)); + $userInstance = call_user_func_array(array(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('user_class'), 'createMemberByUsername'), array($userName)); // Remember this user instance in our registry for later usage $registry->addInstance('user', $userInstance); diff --git a/framework/main/classes/filter/verifier/class_GraphicalCodeCaptchaVerifierFilter.php b/framework/main/classes/filter/verifier/class_GraphicalCodeCaptchaVerifierFilter.php index c1031f31..b88f4bb9 100644 --- a/framework/main/classes/filter/verifier/class_GraphicalCodeCaptchaVerifierFilter.php +++ b/framework/main/classes/filter/verifier/class_GraphicalCodeCaptchaVerifierFilter.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Filter\Verifier\Captcha; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Factory\ObjectFactory; use Org\Mxchange\CoreFramework\Filter\BaseFilter; use Org\Mxchange\CoreFramework\Filter\Chain\FilterChainException; @@ -83,7 +84,7 @@ class GraphicalCodeCaptchaVerifierFilter extends BaseFilter implements Filterabl ); // Is the CAPTCHA enabled? - if ($this->getConfigInstance()->getConfigEntry($configKey) != 'Y') { + if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry($configKey) != 'Y') { // Not enabled, so don't check return; } // END - if diff --git a/framework/main/classes/filter/verifier/class_UserGuestVerifierFilter.php b/framework/main/classes/filter/verifier/class_UserGuestVerifierFilter.php index 6f3a4b00..cca45ec6 100644 --- a/framework/main/classes/filter/verifier/class_UserGuestVerifierFilter.php +++ b/framework/main/classes/filter/verifier/class_UserGuestVerifierFilter.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Filter\Verifier\User; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Filter\BaseFilter; use Org\Mxchange\CoreFramework\Filter\Chain\FilterChainException; use Org\Mxchange\CoreFramework\Filter\Filterable; @@ -129,7 +130,7 @@ class UserGuestVerifierFilter extends BaseFilter implements Filterable { // If this instance is created then the username *does* exist try { // Get a new instance - $userInstance = call_user_func_array(array($this->getConfigInstance()->getConfigEntry('guest_class'), 'createGuestByUsername'), array($userName)); + $userInstance = call_user_func_array(array(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('guest_class'), 'createGuestByUsername'), array($userName)); // Remember this user instance in our registry for later usage $registry->addInstance('user', $userInstance); diff --git a/framework/main/classes/filter/verifier/class_UserNameVerifierFilter.php b/framework/main/classes/filter/verifier/class_UserNameVerifierFilter.php index 6ffd16d5..d2e71f90 100644 --- a/framework/main/classes/filter/verifier/class_UserNameVerifierFilter.php +++ b/framework/main/classes/filter/verifier/class_UserNameVerifierFilter.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Filter\Verifier\User; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Filter\BaseFilter; use Org\Mxchange\CoreFramework\Filter\Chain\FilterChainException; use Org\Mxchange\CoreFramework\Filter\Filterable; @@ -127,7 +128,7 @@ class UserNameVerifierFilter extends BaseFilter implements Filterable { // If this instance is created then the username *does* exist try { // Get a new instance - $userInstance = call_user_func_array(array($this->getConfigInstance()->getConfigEntry('user_class'), 'createMemberByUsername'), array($userName)); + $userInstance = call_user_func_array(array(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('user_class'), 'createMemberByUsername'), array($userName)); // Remember this user instance in our registry for later usage $registry->addInstance('user', $userInstance); diff --git a/framework/main/classes/filter/verifier/class_UserStatusVerifierFilter.php b/framework/main/classes/filter/verifier/class_UserStatusVerifierFilter.php index 52d07d34..7ef1ab67 100644 --- a/framework/main/classes/filter/verifier/class_UserStatusVerifierFilter.php +++ b/framework/main/classes/filter/verifier/class_UserStatusVerifierFilter.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Filter\Verifier\User; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Filter\BaseFilter; use Org\Mxchange\CoreFramework\Filter\Filterable; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; @@ -67,7 +68,7 @@ class UserStatusVerifierFilter extends BaseFilter implements Filterable { $userInstance = GenericRegistry::getRegistry()->getInstance('user'); // Is the user account confirmed? - if ((!$userInstance->isConfirmed()) && (!$userInstance->isGuest()) && ($requestInstance->getRequestElement('action') != $this->getConfigInstance()->getConfigEntry('action_status_problem'))) { + if ((!$userInstance->isConfirmed()) && (!$userInstance->isGuest()) && ($requestInstance->getRequestElement('action') != FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('action_status_problem'))) { // Request is invalid! $requestInstance->requestIsValid(false); diff --git a/framework/main/classes/filter/verifier/class_UserUnconfirmedVerifierFilter.php b/framework/main/classes/filter/verifier/class_UserUnconfirmedVerifierFilter.php index 70094895..94acdfc5 100644 --- a/framework/main/classes/filter/verifier/class_UserUnconfirmedVerifierFilter.php +++ b/framework/main/classes/filter/verifier/class_UserUnconfirmedVerifierFilter.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Filter\Verifier\User; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Database\Frontend\User\UserDatabaseWrapper; use Org\Mxchange\CoreFramework\Factory\User\UserFactory; use Org\Mxchange\CoreFramework\Filter\BaseFilter; @@ -81,7 +82,7 @@ class UserUnconfirmedVerifierFilter extends BaseFilter implements Filterable { } // END - if // Is the user account confirmed? - if ($userInstance->getField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) != $this->getConfigInstance()->getConfigEntry('user_status_unconfirmed')) { + if ($userInstance->getField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) != FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('user_status_unconfirmed')) { // Request is invalid! $requestInstance->requestIsValid(false); diff --git a/framework/main/classes/handler/tasks/class_TaskHandler.php b/framework/main/classes/handler/tasks/class_TaskHandler.php index fbfa2d42..8ef6ffda 100644 --- a/framework/main/classes/handler/tasks/class_TaskHandler.php +++ b/framework/main/classes/handler/tasks/class_TaskHandler.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Handler\Task; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Factory\ObjectFactory; use Org\Mxchange\CoreFramework\Handler\BaseHandler; use Org\Mxchange\CoreFramework\Lists\Listable; @@ -226,8 +227,8 @@ class TaskHandler extends BaseHandler implements Registerable, HandleableTask { */ public function registerTask ($taskName, Visitable $taskInstance) { // Get interval delay - $intervalDelay = $this->getConfigInstance()->getConfigEntry('task_' . $taskName . '_interval_delay'); - $startupDelay = $this->getConfigInstance()->getConfigEntry('task_' . $taskName . '_startup_delay'); + $intervalDelay = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('task_' . $taskName . '_interval_delay'); + $startupDelay = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('task_' . $taskName . '_startup_delay'); // If the task is 'idle_loop', a deplay of zero seconds is fine assert($intervalDelay >= 0); @@ -257,7 +258,7 @@ class TaskHandler extends BaseHandler implements Registerable, HandleableTask { // Interval time (delay) in milliseconds before this task is executed again 'task_interval_delay' => $intervalDelay, // How often should this task run? - 'task_max_runs' => $this->getConfigInstance()->getConfigEntry('task_' . $taskName . '_max_runs'), + 'task_max_runs' => FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('task_' . $taskName . '_max_runs'), ); // Add the entry diff --git a/framework/main/classes/helper/captcha/web/class_GraphicalCodeCaptcha.php b/framework/main/classes/helper/captcha/web/class_GraphicalCodeCaptcha.php index 84f0d711..4a229c0f 100644 --- a/framework/main/classes/helper/captcha/web/class_GraphicalCodeCaptcha.php +++ b/framework/main/classes/helper/captcha/web/class_GraphicalCodeCaptcha.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Helper\Captcha; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Factory\ObjectFactory; use Org\Mxchange\CoreFramework\Generic\FrameworkInterface; use Org\Mxchange\CoreFramework\Helper\Template\HelpableTemplate; @@ -78,10 +79,10 @@ class GraphicalCodeCaptcha extends BaseCaptcha implements SolveableCaptcha { */ public function initiateCaptcha () { // Get total length - $captchaLength = $this->getConfigInstance()->getConfigEntry('captcha_string_length'); + $captchaLength = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('captcha_string_length'); // Get max string length - $strLength = $this->getConfigInstance()->getConfigEntry('random_string_length'); + $strLength = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('random_string_length'); // Calculate starting position based on random place $start = $this->getRngInstance()->randomNumber(0, ($strLength - $captchaLength)); @@ -99,7 +100,7 @@ class GraphicalCodeCaptcha extends BaseCaptcha implements SolveableCaptcha { $captchaString = substr($base64String, $start, $captchaLength); // Get all characters we want to replace - $searchChars = $this->getConfigInstance()->getConfigEntry('captcha_search_chars'); + $searchChars = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('captcha_search_chars'); // Get fixed salt and use it as "replacement characters" $replaceChars = $this->getRngInstance()->getExtraSalt(); diff --git a/framework/main/classes/helper/html/blocks/class_HtmlBlockHelper.php b/framework/main/classes/helper/html/blocks/class_HtmlBlockHelper.php index 81339453..d0d6177f 100644 --- a/framework/main/classes/helper/html/blocks/class_HtmlBlockHelper.php +++ b/framework/main/classes/helper/html/blocks/class_HtmlBlockHelper.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Helper; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Helper\Template\HelpableTemplate; use Org\Mxchange\CoreFramework\Template\CompileableTemplate; @@ -90,7 +91,7 @@ class HtmlBlockHelper extends BaseHtmlHelper implements HelpableTemplate { * @return $withRegistration Whether with registration date */ public function ifIncludeRegistrationStamp () { - $withRegistration = ($this->getConfigInstance()->getConfigEntry('block_shows_registration') == 'Y'); + $withRegistration = (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('block_shows_registration') == 'Y'); return $withRegistration; } diff --git a/framework/main/classes/helper/html/forms/class_HtmlFormHelper.php b/framework/main/classes/helper/html/forms/class_HtmlFormHelper.php index 481616fd..9273cdf2 100644 --- a/framework/main/classes/helper/html/forms/class_HtmlFormHelper.php +++ b/framework/main/classes/helper/html/forms/class_HtmlFormHelper.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Helper; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Database\Frontend\User\UserDatabaseWrapper; use Org\Mxchange\CoreFramework\Factory\ObjectFactory; use Org\Mxchange\CoreFramework\Generic\NullPointerException; @@ -135,10 +136,10 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { // Add HTML code $formContent = sprintf("
", $formName, - $this->getConfigInstance()->getConfigEntry('base_url'), - $this->getConfigInstance()->getConfigEntry('form_action'), - $this->getConfigInstance()->getConfigEntry('form_method'), - $this->getConfigInstance()->getConfigEntry('form_target'), + FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('base_url'), + FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('form_action'), + FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('form_method'), + FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('form_target'), $formId ); @@ -288,7 +289,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { */ public function addInputHiddenConfiguredField ($fieldName, $prefix) { // Get the value from instance - $fieldValue = $this->getConfigInstance()->getConfigEntry("{$prefix}_{$fieldName}"); + $fieldValue = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry("{$prefix}_{$fieldName}"); //* DEBUG: */ print __METHOD__.':'.$fieldName.'='.$fieldValue."
\n"; // Add the text field @@ -766,7 +767,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { * @return $required Whether the email address is required */ public function ifRegisterRequiresEmailVerification () { - $required = ($this->getConfigInstance()->getConfigEntry('register_requires_email') == 'Y'); + $required = (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('register_requires_email') == 'Y'); return $required; } @@ -776,7 +777,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { * @return $required Whether profile data shall be asked */ public function ifRegisterIncludesProfile () { - $required = ($this->getConfigInstance()->getConfigEntry('register_includes_profile') == 'Y'); + $required = (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('register_includes_profile') == 'Y'); return $required; } @@ -786,7 +787,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { * @return $isSecured Whether this form is secured by a CAPTCHA */ public function ifFormSecuredWithCaptcha () { - $isSecured = ($this->getConfigInstance()->getConfigEntry($this->getFormName() . '_captcha_secured') == 'Y'); + $isSecured = (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry($this->getFormName() . '_captcha_secured') == 'Y'); return $isSecured; } @@ -796,7 +797,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { * @return $required Whether personal data shall be asked */ public function ifRegisterIncludesPersonaData () { - $required = ($this->getConfigInstance()->getConfigEntry('register_personal_data') == 'Y'); + $required = (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('register_personal_data') == 'Y'); return $required; } @@ -806,7 +807,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { * @return $required Whether birthday shall be asked */ public function ifProfileIncludesBirthDay () { - $required = ($this->getConfigInstance()->getConfigEntry('profile_includes_birthday') == 'Y'); + $required = (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('profile_includes_birthday') == 'Y'); return $required; } @@ -816,7 +817,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { * @return $isUnique */ public function ifEmailMustBeUnique () { - $isUnique = ($this->getConfigInstance()->getConfigEntry('register_email_unique') == 'Y'); + $isUnique = (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('register_email_unique') == 'Y'); return $isUnique; } @@ -826,7 +827,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { * @return $required Whether the specified chat protocol is enabled */ public function ifChatEnabled ($chatProtocol) { - $required = ($this->getConfigInstance()->getConfigEntry('chat_enabled_' . $chatProtocol) == 'Y'); + $required = (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('chat_enabled_' . $chatProtocol) == 'Y'); return $required; } @@ -836,7 +837,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { * @return $isEnabled Whether the login is enabled or disabled */ public function ifLoginIsEnabled () { - $isEnabled = ($this->getConfigInstance()->getConfigEntry('login_enabled') == 'Y'); + $isEnabled = (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('login_enabled') == 'Y'); return $isEnabled; } @@ -846,7 +847,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { * @return $isEnabled Whether the login shall be done by username */ public function ifLoginWithUsername () { - $isEnabled = ($this->getConfigInstance()->getConfigEntry('login_type') == "username"); + $isEnabled = (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('login_type') == "username"); return $isEnabled; } @@ -856,7 +857,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { * @return $isEnabled Whether the login shall be done by email */ public function ifLoginWithEmail () { - $isEnabled = ($this->getConfigInstance()->getConfigEntry('login_type') == "email"); + $isEnabled = (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('login_type') == "email"); return $isEnabled; } @@ -866,7 +867,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { * @return $isAllowed Whether guest login is allowed */ public function ifGuestLoginAllowed () { - $isAllowed = ($this->getConfigInstance()->getConfigEntry('guest_login_allowed') == 'Y'); + $isAllowed = (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('guest_login_allowed') == 'Y'); return $isAllowed; } @@ -876,7 +877,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { * @return $requireConfirm Whether email change must be confirmed */ public function ifEmailChangeRequireConfirmation () { - $requireConfirm = ($this->getConfigInstance()->getConfigEntry('email_change_confirmation') == 'Y'); + $requireConfirm = (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('email_change_confirmation') == 'Y'); return $requireConfirm; } @@ -896,7 +897,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { * @return $emailChange Whether changing email address is allowed */ public function ifEmailChangeAllowed () { - $emailChange = ($this->getConfigInstance()->getConfigEntry('email_change_allowed') == 'Y'); + $emailChange = (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('email_change_allowed') == 'Y'); return $emailChange; } @@ -906,7 +907,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { * @return $isUnconfirmed Whether the user account is unconfirmed */ public function ifUserAccountUnconfirmed () { - $isUnconfirmed = ($this->getValueField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) === $this->getConfigInstance()->getConfigEntry('user_status_unconfirmed')); + $isUnconfirmed = ($this->getValueField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) === FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('user_status_unconfirmed')); return $isUnconfirmed; } @@ -916,7 +917,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { * @return $isUnconfirmed Whether the user account is locked */ public function ifUserAccountLocked () { - $isUnconfirmed = ($this->getValueField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) === $this->getConfigInstance()->getConfigEntry('user_status_locked')); + $isUnconfirmed = ($this->getValueField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) === FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('user_status_locked')); return $isUnconfirmed; } @@ -926,7 +927,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { * @return $isUnconfirmed Whether the user account is a guest */ public function ifUserAccountGuest () { - $isUnconfirmed = ($this->getValueField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) === $this->getConfigInstance()->getConfigEntry('user_status_guest')); + $isUnconfirmed = ($this->getValueField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) === FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('user_status_guest')); return $isUnconfirmed; } @@ -937,7 +938,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { * @return $refillActive Whether the refill page is active */ public function ifRefillPageActive () { - $refillActive = ($this->getConfigInstance()->getConfigEntry('refill_page_active') == 'Y'); + $refillActive = (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('refill_page_active') == 'Y'); return $refillActive; } diff --git a/framework/main/classes/helper/html/links/class_HtmlLinkHelper.php b/framework/main/classes/helper/html/links/class_HtmlLinkHelper.php index 58749f72..caba4ff1 100644 --- a/framework/main/classes/helper/html/links/class_HtmlLinkHelper.php +++ b/framework/main/classes/helper/html/links/class_HtmlLinkHelper.php @@ -109,7 +109,7 @@ class HtmlLinkHelper extends BaseHtmlHelper implements HelpableTemplate { // Determine link base from config now and 'command' request try { - $newLinkBase = $helperInstance->getConfigInstance()->getConfigEntry($configEntry); + $newLinkBase = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry($configEntry); $linkBase = $newLinkBase; } catch (NoConfigEntryException $e) { // Is the deprecated linkBase not set? diff --git a/framework/main/classes/iterator/registry/class_RegistryIterator.php b/framework/main/classes/iterator/registry/class_RegistryIterator.php index 58316c9f..c042707f 100644 --- a/framework/main/classes/iterator/registry/class_RegistryIterator.php +++ b/framework/main/classes/iterator/registry/class_RegistryIterator.php @@ -53,6 +53,11 @@ class RegistryIterator extends BaseIterator implements IteratableRegistry { */ private $key = NULL; + /** + * Registry instance (implementing Register) + */ + private $registryInstance = NULL; + /** * Protected constructor * @@ -88,6 +93,25 @@ class RegistryIterator extends BaseIterator implements IteratableRegistry { return $iteratorInstance; } + /** + * Setter for registry instance + * + * @param $registryInstance An instance of a Register class + * @return void + */ + protected final function setRegistryInstance (Register $registryInstance) { + $this->registryInstance = $registryInstance; + } + + /** + * Getter for registry instance + * + * @return $registryInstance The debug registry instance + */ + protected final function getRegistryInstance () { + return $this->registryInstance; + } + /** * Setter for only-registries array * diff --git a/framework/main/classes/language/class_LanguageSystem.php b/framework/main/classes/language/class_LanguageSystem.php index bb3c76db..4a1c0fd0 100644 --- a/framework/main/classes/language/class_LanguageSystem.php +++ b/framework/main/classes/language/class_LanguageSystem.php @@ -91,7 +91,7 @@ class LanguageSystem extends BaseFrameworkSystem implements ManageableLanguage, // 2) Try to build it $languageBasePath = sprintf('%s%s/language/', - $langInstance->getConfigInstance()->getConfigEntry('application_base_path'), + FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('application_base_path'), $applicationInstance->getAppShortName() ); } // END - if diff --git a/framework/main/classes/mailer/class_BaseMailer.php b/framework/main/classes/mailer/class_BaseMailer.php index 540c9fc0..48d37b6a 100644 --- a/framework/main/classes/mailer/class_BaseMailer.php +++ b/framework/main/classes/mailer/class_BaseMailer.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Mailer; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Generic\FrameworkInterface; use Org\Mxchange\CoreFramework\Manager\Login\ManageableMember; use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem; @@ -57,7 +58,7 @@ abstract class BaseMailer extends BaseFrameworkSystem { $this->setTemplateName($templateName); // Get configuration entry - $templatePrefix = $this->getConfigInstance()->getConfigEntry('email_tpl_' . $templateName); + $templatePrefix = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('email_tpl_' . $templateName); // Load this email template $this->getTemplateInstance()->loadEmailTemplate($templatePrefix . '_' . $templateName); diff --git a/framework/main/classes/menu/class_BaseMenu.php b/framework/main/classes/menu/class_BaseMenu.php index 4c4adee8..970800a0 100644 --- a/framework/main/classes/menu/class_BaseMenu.php +++ b/framework/main/classes/menu/class_BaseMenu.php @@ -66,7 +66,7 @@ abstract class BaseMenu extends BaseFrameworkSystem { // If page is empty, choose default if (empty($command)) { // Use default page as none has been specified - $command = $this->getConfigInstance()->getConfigEntry('default_' . GenericRegistry::getRegistry()->getInstance('application')->getAppShortName() . '_' . FrameworkBootstrap::getRequestTypeFromSystem() . '_command'); + $command = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('default_' . GenericRegistry::getRegistry()->getInstance('application')->getAppShortName() . '_' . FrameworkBootstrap::getRequestTypeFromSystem() . '_command'); } // END - if // Load the menu template for this page diff --git a/framework/main/classes/output/debug/console/class_DebugConsoleOutput.php b/framework/main/classes/output/debug/console/class_DebugConsoleOutput.php index d109455a..75abd987 100644 --- a/framework/main/classes/output/debug/console/class_DebugConsoleOutput.php +++ b/framework/main/classes/output/debug/console/class_DebugConsoleOutput.php @@ -71,7 +71,7 @@ class DebugConsoleOutput extends BaseDebugOutput implements Debugger, OutputStre } // END - if // Are debug times enabled? - if ($this->getConfigInstance()->getConfigEntry('debug_' . FrameworkBootstrap::getRequestTypeFromSystem() . '_output_timings') == 'Y') { + if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('debug_' . FrameworkBootstrap::getRequestTypeFromSystem() . '_output_timings') == 'Y') { // Output it first $output = $this->getPrintableExecutionTime() . $output; } // END - if diff --git a/framework/main/classes/output/web/class_WebOutput.php b/framework/main/classes/output/web/class_WebOutput.php index 52dd6959..89f8d055 100644 --- a/framework/main/classes/output/web/class_WebOutput.php +++ b/framework/main/classes/output/web/class_WebOutput.php @@ -62,7 +62,7 @@ class WebOutput extends BaseOutput implements OutputStreamer, Registerable { self::$webInstance = new WebOutput(); // Get the content type - $contentType = self::$webInstance->getConfigInstance()->getConfigEntry('web_content_type'); + $contentType = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('web_content_type'); // Set the content type if (!empty($contentType)) { diff --git a/framework/main/classes/points/class_UserPoints.php b/framework/main/classes/points/class_UserPoints.php index fdab0b49..0d9c329d 100644 --- a/framework/main/classes/points/class_UserPoints.php +++ b/framework/main/classes/points/class_UserPoints.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\User\Points; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Criteria\Storing\StoreableCriteria; use Org\Mxchange\CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory; use Org\Mxchange\CoreFramework\Factory\ObjectFactory; @@ -115,7 +116,7 @@ class UserPoints extends BaseFrameworkSystem implements Registerable, BookablePo $hasRequired = false; // Get the required points entry - $requiredPoints = $this->getConfigInstance()->getConfigEntry($action . '_action_points'); + $requiredPoints = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry($action . '_action_points'); // Rewind always $this->getResultInstance()->rewind(); diff --git a/framework/main/classes/resolver/action/html/class_HtmlActionResolver.php b/framework/main/classes/resolver/action/html/class_HtmlActionResolver.php index 7f77fb11..52a39c63 100644 --- a/framework/main/classes/resolver/action/html/class_HtmlActionResolver.php +++ b/framework/main/classes/resolver/action/html/class_HtmlActionResolver.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Resolver\Action; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Request\Requestable; // Import SPL stuff @@ -95,7 +96,7 @@ class HtmlActionResolver extends BaseActionResolver implements ActionResolver { // Is the action empty? Then fall back to default action if (empty($actionName)) { - $actionName = $this->getConfigInstance()->getConfigEntry('default_action'); + $actionName = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('default_action'); } // END - if // Check if action is valid @@ -135,7 +136,7 @@ class HtmlActionResolver extends BaseActionResolver implements ActionResolver { // Is the action empty? Then fall back to default action if (empty($actionName)) { - $actionName = $this->getConfigInstance()->getConfigEntry('default_action'); + $actionName = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('default_action'); } // END - if // Check if action is valid diff --git a/framework/main/classes/resolver/class_BaseResolver.php b/framework/main/classes/resolver/class_BaseResolver.php index 56f2c4dd..432cb562 100644 --- a/framework/main/classes/resolver/class_BaseResolver.php +++ b/framework/main/classes/resolver/class_BaseResolver.php @@ -30,6 +30,12 @@ use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem; * along with this program. If not, see . */ abstract class BaseResolver extends BaseFrameworkSystem { + // Exception constants + const EXCEPTION_INVALID_COMMAND = 0x1d0; + const EXCEPTION_INVALID_CONTROLLER = 0x1d1; + const EXCEPTION_INVALID_ACTION = 0x1d2; + const EXCEPTION_INVALID_STATE = 0x1d3; + /** * Namespace */ @@ -55,12 +61,6 @@ abstract class BaseResolver extends BaseFrameworkSystem { */ private $controllerInstance = NULL; - // Exception constants - const EXCEPTION_INVALID_COMMAND = 0x1d0; - const EXCEPTION_INVALID_CONTROLLER = 0x1d1; - const EXCEPTION_INVALID_ACTION = 0x1d2; - const EXCEPTION_INVALID_STATE = 0x1d3; - /** * Protected constructor * diff --git a/framework/main/classes/resolver/command/class_BaseCommandResolver.php b/framework/main/classes/resolver/command/class_BaseCommandResolver.php index 4dd1861e..2b319c1b 100644 --- a/framework/main/classes/resolver/command/class_BaseCommandResolver.php +++ b/framework/main/classes/resolver/command/class_BaseCommandResolver.php @@ -37,6 +37,11 @@ use \UnexpectedValueException; * along with this program. If not, see . */ abstract class BaseCommandResolver extends BaseResolver { + /** + * Command name + */ + private $commandName = ''; + /** * Protected constructor * @@ -48,6 +53,25 @@ abstract class BaseCommandResolver extends BaseResolver { parent::__construct($className); } + /** + * Setter for command name + * + * @param $commandName Last validated command name + * @return void + */ + protected final function setCommandName (string $commandName) { + $this->commandName = $commandName; + } + + /** + * Getter for command name + * + * @return $commandName Last validated command name + */ + protected final function getCommandName () { + return $this->commandName; + } + /** * "Loads" a given command and instances it if not yet cached * @@ -103,7 +127,7 @@ abstract class BaseCommandResolver extends BaseResolver { // Is the command empty? Then fall back to default command if (empty($commandName)) { - $commandName = $this->getConfigInstance()->getConfigEntry('default_' . FrameworkBootstrap::getRequestTypeFromSystem() . '_command'); + $commandName = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('default_' . FrameworkBootstrap::getRequestTypeFromSystem() . '_command'); } // END - if // Check if command is valid @@ -152,7 +176,7 @@ abstract class BaseCommandResolver extends BaseResolver { // Is the command empty? Then fall back to default command if (empty($commandName)) { // Init default command - $commandName = $this->getConfigInstance()->getConfigEntry('default_' . FrameworkBootstrap::getRequestTypeFromSystem() . '_command'); + $commandName = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('default_' . FrameworkBootstrap::getRequestTypeFromSystem() . '_command'); } // END - if // Check if command is valid diff --git a/framework/main/classes/resolver/controller/class_BaseControllerResolver.php b/framework/main/classes/resolver/controller/class_BaseControllerResolver.php index c47e4df2..3f24811a 100644 --- a/framework/main/classes/resolver/controller/class_BaseControllerResolver.php +++ b/framework/main/classes/resolver/controller/class_BaseControllerResolver.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Resolver\Controller; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Controller\Controller; use Org\Mxchange\CoreFramework\Controller\DefaultControllerException; use Org\Mxchange\CoreFramework\Controller\InvalidControllerException; @@ -37,6 +38,11 @@ use \InvalidArgumentException; * along with this program. If not, see . */ abstract class BaseControllerResolver extends BaseResolver { + /** + * Controller name + */ + private $controllerName = ''; + /** * Protected constructor * @@ -48,6 +54,25 @@ abstract class BaseControllerResolver extends BaseResolver { parent::__construct($className); } + /** + * Setter for controller name + * + * @param $controllerName Last validated controller name + * @return void + */ + protected final function setControllerName (string $controllerName) { + $this->controllerName = $controllerName; + } + + /** + * Getter for controller name + * + * @return $controllerName Last validated controller name + */ + protected final function getControllerName () { + return $this->controllerName; + } + /** * "Loads" a given controller and instances it if not yet cached. If the * controller was not found one of the default controllers will be used @@ -60,7 +85,7 @@ abstract class BaseControllerResolver extends BaseResolver { */ protected function loadController ($controllerName) { // Cache default controller - $defaultController = $this->getConfigInstance()->getConfigEntry('default_' . strtolower($this->getClassPrefix()) . '_controller'); + $defaultController = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('default_' . strtolower($this->getClassPrefix()) . '_controller'); // Init controller instance $controllerInstance = NULL; @@ -105,7 +130,7 @@ abstract class BaseControllerResolver extends BaseResolver { // Get the config, this will throw an exception if there is no special controller resolver //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-CONTROLLER-RESOLVER: resolverConfigEntry=%s', $resolverConfigEntry)); - $resolverClass = $this->getConfigInstance()->getConfigEntry($resolverConfigEntry); + $resolverClass = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry($resolverConfigEntry); // Initiate the resolver and controller $resolverInstance = ObjectFactory::createObjectByConfiguredName( diff --git a/framework/main/classes/response/class_BaseResponse.php b/framework/main/classes/response/class_BaseResponse.php index b15b370d..cb5d9849 100644 --- a/framework/main/classes/response/class_BaseResponse.php +++ b/framework/main/classes/response/class_BaseResponse.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Response; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; @@ -200,7 +201,7 @@ abstract class BaseResponse extends BaseFrameworkSystem { $this->addHeader('Pragma', 'no-cache'); // HTTP/1.0 // Define the charset to be used - //$this->addHeader('Content-type:', sprintf("text/html; charset=%s", $this->getConfigInstance()->getConfigEntry('header_charset'))); + //$this->addHeader('Content-type:', sprintf("text/html; charset=%s", FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('header_charset'))); // Send all headers foreach ($this->responseHeaders as $name => $value) { @@ -252,7 +253,7 @@ abstract class BaseResponse extends BaseFrameworkSystem { ); // Get default command response - $defaultCommand = $this->getConfigInstance()->getConfigEntry($configKey); + $defaultCommand = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry($configKey); // Return it return $defaultCommand; diff --git a/framework/main/classes/response/html/class_HtmlResponse.php b/framework/main/classes/response/html/class_HtmlResponse.php index 2e84655b..62cf8800 100644 --- a/framework/main/classes/response/html/class_HtmlResponse.php +++ b/framework/main/classes/response/html/class_HtmlResponse.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Response; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Manager\ManageableApplication; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -103,11 +104,11 @@ class HtmlResponse extends BaseResponse implements Responseable { // Get all config entries if (is_null($expires)) { - $expires = (time() + $this->getConfigInstance()->getConfigEntry('cookie_expire')); + $expires = (time() + FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('cookie_expire')); } // END - if - $path = $this->getConfigInstance()->getConfigEntry('cookie_path'); - $domain = $this->getConfigInstance()->getConfigEntry('cookie_domain'); + $path = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('cookie_path'); + $domain = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('cookie_domain'); setcookie($cookieName, $cookieValue, $expires); //, $path, $domain, (isset($_SERVER['HTTPS'])) @@ -144,7 +145,7 @@ class HtmlResponse extends BaseResponse implements Responseable { $this->getTemplateInstance()->assignApplicationData($applicationInstance); // Get the url from config - $url = $this->getConfigInstance()->getConfigEntry($configEntry . '_url'); + $url = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry($configEntry . '_url'); // Compile the URL $url = $this->getTemplateInstance()->compileRawCode($url); @@ -157,7 +158,7 @@ class HtmlResponse extends BaseResponse implements Responseable { } // END - if // No, then extend it with our base URL - $url = $this->getConfigInstance()->getConfigEntry('base_url') . '/' . $url; + $url = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('base_url') . '/' . $url; } // END - if // Add redirect header diff --git a/framework/main/classes/response/image/class_ImageResponse.php b/framework/main/classes/response/image/class_ImageResponse.php index 3d54e6a4..8be1d27c 100644 --- a/framework/main/classes/response/image/class_ImageResponse.php +++ b/framework/main/classes/response/image/class_ImageResponse.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Response; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Manager\ManageableApplication; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -67,7 +68,7 @@ class ImageResponse extends BaseResponse implements Responseable { */ public final function initTemplateEngine (ManageableApplication $applicationInstance) { // Get config instance - $cfg = $this->getConfigInstance(); + $cfg = FrameworkBootstrap::getConfigurationInstance(); // Set new template engine $cfg->setConfigEntry('html_template_class' , $cfg->getConfigEntry('image_template_class')); @@ -113,11 +114,11 @@ class ImageResponse extends BaseResponse implements Responseable { // Get all config entries if (is_null($expires)) { - $expires = (time() + $this->getConfigInstance()->getConfigEntry('cookie_expire')); + $expires = (time() + FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('cookie_expire')); } // END - if - $path = $this->getConfigInstance()->getConfigEntry('cookie_path'); - $domain = $this->getConfigInstance()->getConfigEntry('cookie_domain'); + $path = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('cookie_path'); + $domain = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('cookie_domain'); setcookie($cookieName, $cookieValue, $expires); //, $path, $domain, (isset($_SERVER['HTTPS'])) @@ -154,7 +155,7 @@ class ImageResponse extends BaseResponse implements Responseable { $this->getTemplateInstance()->assignApplicationData($applicationInstance); // Get the url from config - $url = $this->getConfigInstance()->getConfigEntry($configEntry . '_url'); + $url = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry($configEntry . '_url'); // Compile the URL $url = $this->getTemplateInstance()->compileRawCode($url); @@ -165,7 +166,7 @@ class ImageResponse extends BaseResponse implements Responseable { if (substr($url, 0, 1) == '/') $url = substr($url, 1); // No, then extend it with our base URL - $url = $this->getConfigInstance()->getConfigEntry('base_url') . '/' . $url; + $url = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('base_url') . '/' . $url; } // END - if // Add redirect header diff --git a/framework/main/classes/rng/class_RandomNumberGenerator.php b/framework/main/classes/rng/class_RandomNumberGenerator.php index c3f09d94..12d48132 100644 --- a/framework/main/classes/rng/class_RandomNumberGenerator.php +++ b/framework/main/classes/rng/class_RandomNumberGenerator.php @@ -106,7 +106,7 @@ class RandomNumberGenerator extends BaseFrameworkSystem { */ protected function initRng ($extraInstance) { // Get the prime number from config - $this->prime = $this->getConfigInstance()->getConfigEntry('math_prime'); + $this->prime = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('math_prime'); // Calculate the extra number which is always the same unless you give // a better prime number @@ -119,7 +119,7 @@ class RandomNumberGenerator extends BaseFrameworkSystem { $serverIp = 'cluster'; // Do we have a single server? - if ($this->getConfigInstance()->getConfigEntry('is_single_server') == 'Y') { + if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('is_single_server') == 'Y') { // Then use that IP for extra security $serverIp = FrameworkBootstrap::detectServerAddress(); } // END - if @@ -141,12 +141,12 @@ class RandomNumberGenerator extends BaseFrameworkSystem { $this->extraSalt = sha1( $this->fixedSalt . ':' . getenv('SERVER_SOFTWARE') . ':' . - $this->getConfigInstance()->getConfigEntry('date_key') . ':' . - $this->getConfigInstance()->getConfigEntry('base_url') + FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('date_key') . ':' . + FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('base_url') ); // Get config entry for max salt length - $this->rndStrLen = $this->getConfigInstance()->getConfigEntry('rnd_str_length'); + $this->rndStrLen = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('rnd_str_length'); } /** @@ -214,7 +214,7 @@ class RandomNumberGenerator extends BaseFrameworkSystem { $key = md5($this->getExtraSalt()); // Get key - if ($this->getConfigInstance()->getConfigEntry('crypt_fixed_salt') == 'Y') { + if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('crypt_fixed_salt') == 'Y') { $key = md5($this->getFixedSalt()); } // END - if diff --git a/framework/main/classes/stacker/class_BaseStacker.php b/framework/main/classes/stacker/class_BaseStacker.php index 9cfb1655..715dd24c 100644 --- a/framework/main/classes/stacker/class_BaseStacker.php +++ b/framework/main/classes/stacker/class_BaseStacker.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Stacker; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem; /** @@ -106,7 +107,7 @@ abstract class BaseStacker extends BaseFrameworkSystem { } // END - if // So, is the stack full? - $isFull = (($this->getStackCount($stackerName)) == $this->getConfigInstance()->getConfigEntry('stacker_' . $stackerName . '_max_size')); + $isFull = (($this->getStackCount($stackerName)) == FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('stacker_' . $stackerName . '_max_size')); // Return result return $isFull; diff --git a/framework/main/classes/tasks/idle/class_IdleLoopTask.php b/framework/main/classes/tasks/idle/class_IdleLoopTask.php index f247de2d..975721cc 100644 --- a/framework/main/classes/tasks/idle/class_IdleLoopTask.php +++ b/framework/main/classes/tasks/idle/class_IdleLoopTask.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Task\IdleLoop; // Import Framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Task\BaseTask; use Org\Mxchange\CoreFramework\Task\Taskable; use Org\Mxchange\CoreFramework\Visitor\Visitable; @@ -46,7 +47,7 @@ class IdleLoopTask extends BaseTask implements Taskable, Visitable { parent::__construct(__CLASS__); // Init idle loop time from config ("cache" it here) - $this->idleTime = $this->getConfigInstance()->getConfigEntry('idle_loop_time'); + $this->idleTime = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('idle_loop_time'); } /** diff --git a/framework/main/classes/template/class_BaseTemplateEngine.php b/framework/main/classes/template/class_BaseTemplateEngine.php index 2460e54c..fa0be9e4 100644 --- a/framework/main/classes/template/class_BaseTemplateEngine.php +++ b/framework/main/classes/template/class_BaseTemplateEngine.php @@ -720,7 +720,7 @@ abstract class BaseTemplateEngine extends BaseFrameworkSystem { $this->loadRawTemplateData($fileInstance); } catch (FileNotFoundException $e) { // If we shall load a code-template we need to switch the file extension - if (($this->getTemplateType() != $this->getConfigInstance()->getConfigEntry('html_template_type')) && (empty($extOther))) { + if (($this->getTemplateType() != FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('html_template_type')) && (empty($extOther))) { // Switch over to the code-template extension and try it again $ext = $this->getCodeTemplateExtension(); @@ -1100,7 +1100,7 @@ abstract class BaseTemplateEngine extends BaseFrameworkSystem { */ public function loadHtmlTemplate (string $template) { // Set template type - $this->setTemplateType($this->getConfigInstance()->getConfigEntry('html_template_type')); + $this->setTemplateType(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('html_template_type')); // Load the special template $this->loadTemplate($template); @@ -1187,8 +1187,8 @@ abstract class BaseTemplateEngine extends BaseFrameworkSystem { $variableName = trim(StringUtils::convertDashesToUnderscores($variableName)); // Sweet and simple... - //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE: variableName=' . $variableName . ',getConfigEntry()=' . $this->getConfigInstance()->getConfigEntry($variableName)); - $this->assignVariable($variableName, $this->getConfigInstance()->getConfigEntry($variableName)); + //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE: variableName=' . $variableName . ',getConfigEntry()=' . FrameworkBootstrap::getConfigurationInstance()->getConfigEntry($variableName)); + $this->assignVariable($variableName, FrameworkBootstrap::getConfigurationInstance()->getConfigEntry($variableName)); } /** @@ -1240,7 +1240,7 @@ abstract class BaseTemplateEngine extends BaseFrameworkSystem { */ public function loadCodeTemplate (string $template) { // Set template type - $this->setTemplateType($this->getConfigInstance()->getConfigEntry('code_' . FrameworkBootstrap::getRequestTypeFromSystem() . '_template_type')); + $this->setTemplateType(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('code_' . FrameworkBootstrap::getRequestTypeFromSystem() . '_template_type')); // Load the special template $this->loadTemplate($template); @@ -1255,7 +1255,7 @@ abstract class BaseTemplateEngine extends BaseFrameworkSystem { */ public function loadEmailTemplate (string $template) { // Set template type - $this->setTemplateType($this->getConfigInstance()->getConfigEntry('email_template_type')); + $this->setTemplateType(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('email_template_type')); // Load the special template $this->loadTemplate($template); @@ -1289,7 +1289,7 @@ abstract class BaseTemplateEngine extends BaseFrameworkSystem { //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE: value='. $value . ',name=' . $currVariable['name'] . ',index=' . $index); // Is it a configuration key? - if ($this->getConfigInstance()->isConfigurationEntrySet($value)) { + if (FrameworkBootstrap::getConfigurationInstance()->isConfigurationEntrySet($value)) { // The value itself is a configuration entry $this->assignConfigVariable($value); } else { @@ -1307,7 +1307,7 @@ abstract class BaseTemplateEngine extends BaseFrameworkSystem { */ public final function compileVariables () { // Initialize the $content array - $validVar = $this->getConfigInstance()->getConfigEntry('tpl_valid_var'); + $validVar = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('tpl_valid_var'); $dummy = array(); // Iterate through all general variables @@ -1399,12 +1399,12 @@ abstract class BaseTemplateEngine extends BaseFrameworkSystem { */ public function compileTemplate () { // Get code type to make things shorter - $codeType = $this->getConfigInstance()->getConfigEntry('code_' . FrameworkBootstrap::getRequestTypeFromSystem() . '_template_type'); + $codeType = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('code_' . FrameworkBootstrap::getRequestTypeFromSystem() . '_template_type'); // We will only work with template type "code" from configuration if (substr($this->getTemplateType(), 0, strlen($codeType)) != $codeType) { // Abort here - throw new UnexpectedTemplateTypeException(array($this, $this->getTemplateType(), $this->getConfigInstance()->getConfigEntry('code_' . FrameworkBootstrap::getRequestTypeFromSystem() . '_template_type')), self::EXCEPTION_TEMPLATE_TYPE_IS_UNEXPECTED); + throw new UnexpectedTemplateTypeException(array($this, $this->getTemplateType(), FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('code_' . FrameworkBootstrap::getRequestTypeFromSystem() . '_template_type')), self::EXCEPTION_TEMPLATE_TYPE_IS_UNEXPECTED); } // Get the raw data. diff --git a/framework/main/classes/template/console/class_ConsoleTemplateEngine.php b/framework/main/classes/template/console/class_ConsoleTemplateEngine.php index a3132e81..a718d80d 100644 --- a/framework/main/classes/template/console/class_ConsoleTemplateEngine.php +++ b/framework/main/classes/template/console/class_ConsoleTemplateEngine.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Template\Engine; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Filesystem\InvalidDirectoryException; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Template\CompileableTemplate; @@ -63,7 +64,7 @@ class ConsoleTemplateEngine extends BaseTemplateEngine implements CompileableTem $applicationInstance = GenericRegistry::getRegistry()->getInstance('application'); // Determine base path - $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getAppShortName(). '/'; + $templateBasePath = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('application_base_path') . $applicationInstance->getAppShortName(). '/'; // Is the base path valid? if (empty($templateBasePath)) { @@ -84,13 +85,13 @@ class ConsoleTemplateEngine extends BaseTemplateEngine implements CompileableTem $templateInstance->setTemplateBasePath($templateBasePath); // Set template extensions - $templateInstance->setRawTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('raw_template_extension')); - $templateInstance->setCodeTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('code_template_extension')); + $templateInstance->setRawTemplateExtension(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('raw_template_extension')); + $templateInstance->setCodeTemplateExtension(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('code_template_extension')); // Absolute output path for compiled templates $templateInstance->setCompileOutputPath(sprintf('%s%s/', $templateBasePath, - $templateInstance->getConfigInstance()->getConfigEntry('compile_output_path') + FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('compile_output_path') )); // Return the prepared instance diff --git a/framework/main/classes/template/html/class_HtmlTemplateEngine.php b/framework/main/classes/template/html/class_HtmlTemplateEngine.php index b8c3a01c..32513179 100644 --- a/framework/main/classes/template/html/class_HtmlTemplateEngine.php +++ b/framework/main/classes/template/html/class_HtmlTemplateEngine.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Template\Engine; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Filesystem\InvalidDirectoryException; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Template\CompileableTemplate; @@ -63,7 +64,7 @@ class HtmlTemplateEngine extends BaseTemplateEngine implements CompileableTempla $applicationInstance = GenericRegistry::getRegistry()->getInstance('application'); // Determine base path - $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getAppShortName(). '/'; + $templateBasePath = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('application_base_path') . $applicationInstance->getAppShortName(). '/'; // Is the base path valid? if (empty($templateBasePath)) { @@ -84,13 +85,13 @@ class HtmlTemplateEngine extends BaseTemplateEngine implements CompileableTempla $templateInstance->setTemplateBasePath($templateBasePath); // Set template extensions - $templateInstance->setRawTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('raw_template_extension')); - $templateInstance->setCodeTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('code_template_extension')); + $templateInstance->setRawTemplateExtension(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('raw_template_extension')); + $templateInstance->setCodeTemplateExtension(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('code_template_extension')); // Absolute output path for compiled templates $templateInstance->setCompileOutputPath(sprintf('%s%s/', $templateBasePath, - $templateInstance->getConfigInstance()->getConfigEntry('compile_output_path') + FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('compile_output_path') )); // Return the prepared instance diff --git a/framework/main/classes/template/image/class_ImageTemplateEngine.php b/framework/main/classes/template/image/class_ImageTemplateEngine.php index 33f90015..1ef96f6d 100644 --- a/framework/main/classes/template/image/class_ImageTemplateEngine.php +++ b/framework/main/classes/template/image/class_ImageTemplateEngine.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Template\Engine; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Factory\ObjectFactory; use Org\Mxchange\CoreFramework\Filesystem\InvalidDirectoryException; use Org\Mxchange\CoreFramework\Parser\Xml\XmlParser; @@ -100,7 +101,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl $applicationInstance = GenericRegistry::getRegistry()->getInstance('application'); // Determine base path - $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getAppShortName(). '/'; + $templateBasePath = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('application_base_path') . $applicationInstance->getAppShortName(). '/'; // Is the base path valid? if (empty($templateBasePath)) { @@ -121,13 +122,13 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl $templateInstance->setTemplateBasePath($templateBasePath); // Set template extensions - $templateInstance->setRawTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('raw_template_extension')); - $templateInstance->setCodeTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('code_template_extension')); + $templateInstance->setRawTemplateExtension(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('raw_template_extension')); + $templateInstance->setCodeTemplateExtension(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('code_template_extension')); // Absolute output path for compiled templates $templateInstance->setCompileOutputPath(sprintf('%s%s/', $templateBasePath, - $templateInstance->getConfigInstance()->getConfigEntry('compile_output_path') + FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('compile_output_path') )); // Return the prepared instance @@ -479,7 +480,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl public function getImageCacheFile () { // Get the instance ready $fileInstance = new SplFileInfo(sprintf('%s%s%s/%s.%s', - $this->getConfigInstance()->getConfigEntry('root_base_path'), + FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('root_base_path'), $this->getGenericBasePath(), 'images/_cache', md5( @@ -512,7 +513,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl */ public function loadImageTemplate ($template) { // Set template type - $this->setTemplateType($this->getConfigInstance()->getConfigEntry('image_template_type')); + $this->setTemplateType(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('image_template_type')); // Load the special template $this->loadTemplate($template); diff --git a/framework/main/classes/template/mail/class_MailTemplateEngine.php b/framework/main/classes/template/mail/class_MailTemplateEngine.php index bd409dbe..e68a66e6 100644 --- a/framework/main/classes/template/mail/class_MailTemplateEngine.php +++ b/framework/main/classes/template/mail/class_MailTemplateEngine.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Template\Engine; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Filesystem\InvalidDirectoryException; use Org\Mxchange\CoreFramework\Mailer\DeliverableMail; use Org\Mxchange\CoreFramework\Parser\Xml\XmlParser; @@ -93,7 +94,7 @@ class MailTemplateEngine extends BaseTemplateEngine implements CompileableTempla $applicationInstance = GenericRegistry::getRegistry()->getInstance('application'); // Determine base path - $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getAppShortName(). '/'; + $templateBasePath = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('application_base_path') . $applicationInstance->getAppShortName(). '/'; // Is the base path valid? if (empty($templateBasePath)) { @@ -114,13 +115,13 @@ class MailTemplateEngine extends BaseTemplateEngine implements CompileableTempla $templateInstance->setTemplateBasePath($templateBasePath); // Set template extensions - $templateInstance->setRawTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('raw_template_extension')); - $templateInstance->setCodeTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('code_template_extension')); + $templateInstance->setRawTemplateExtension(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('raw_template_extension')); + $templateInstance->setCodeTemplateExtension(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('code_template_extension')); // Absolute output path for compiled templates $templateInstance->setCompileOutputPath(sprintf('%s%s/', $templateBasePath, - $templateInstance->getConfigInstance()->getConfigEntry('compile_output_path') + FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('compile_output_path') )); // Return the prepared instance diff --git a/framework/main/classes/template/menu/class_MenuTemplateEngine.php b/framework/main/classes/template/menu/class_MenuTemplateEngine.php index eea98436..0bc2e03e 100644 --- a/framework/main/classes/template/menu/class_MenuTemplateEngine.php +++ b/framework/main/classes/template/menu/class_MenuTemplateEngine.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Template\Engine; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Factory\ObjectFactory; use Org\Mxchange\CoreFramework\Filesystem\InvalidDirectoryException; use Org\Mxchange\CoreFramework\Menu\RenderableMenu; @@ -154,7 +155,7 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla $applicationInstance = GenericRegistry::getRegistry()->getInstance('application'); // Determine base path - $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getAppShortName(). '/'; + $templateBasePath = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('application_base_path') . $applicationInstance->getAppShortName(). '/'; // Is the base path valid? if (empty($templateBasePath)) { @@ -175,13 +176,13 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla $templateInstance->setTemplateBasePath($templateBasePath); // Set template extensions - $templateInstance->setRawTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('raw_template_extension')); - $templateInstance->setCodeTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('menu_template_extension')); + $templateInstance->setRawTemplateExtension(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('raw_template_extension')); + $templateInstance->setCodeTemplateExtension(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('menu_template_extension')); // Absolute output path for compiled templates $templateInstance->setCompileOutputPath(sprintf('%s%s/', $templateBasePath, - $templateInstance->getConfigInstance()->getConfigEntry('compile_output_path') + FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('compile_output_path') )); // Set the menu instance @@ -206,7 +207,7 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla */ public function loadMenuTemplate ($template) { // Set template type - $this->setTemplateType($this->getConfigInstance()->getConfigEntry('menu_template_type')); + $this->setTemplateType(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('menu_template_type')); // Load the special template $this->loadTemplate($template); @@ -877,7 +878,7 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla // Get the file instance ready $fileInstance = new SplFileInfo(sprintf('%s%smenus/_cache/%s.%s', - $this->getConfigInstance()->getConfigEntry('application_base_path'), + FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('application_base_path'), $applicationInstance->getAppShortName(), md5( $this->getMenuInstance()->getMenuName() . ':' . diff --git a/framework/main/classes/tools/console/class_ConsoleTools.php b/framework/main/classes/tools/console/class_ConsoleTools.php index 4cddfca2..d4c7b728 100644 --- a/framework/main/classes/tools/console/class_ConsoleTools.php +++ b/framework/main/classes/tools/console/class_ConsoleTools.php @@ -67,7 +67,7 @@ class ConsoleTools extends BaseFrameworkSystem { // Do we have cache? if (!isset($GLOBALS[__METHOD__])) { // Determine it - $GLOBALS[__METHOD__] = (($this->getConfigInstance()->getConfigEntry('proxy_host') != '') && ($this->getConfigInstance()->getConfigEntry('proxy_port') > 0)); + $GLOBALS[__METHOD__] = ((FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('proxy_host') != '') && (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('proxy_port') > 0)); } // END - if // Return cache @@ -93,9 +93,9 @@ class ConsoleTools extends BaseFrameworkSystem { $proxyTunnel .= 'Proxy-Connection: Keep-Alive' . self::HTTP_EOL; // Use login data to proxy? (username at least!) - if ($this->getConfigInstance()->getConfigEntry('proxy_username') != '') { + if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('proxy_username') != '') { // Add it as well - $encodedAuth = base64_encode($this->getConfigInstance()->getConfigEntry('proxy_username') . ':' . $this->getConfigInstance()->getConfigEntry('proxy_password')); + $encodedAuth = base64_encode(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('proxy_username') . ':' . FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('proxy_password')); $proxyTunnel .= 'Proxy-Authorization: Basic ' . $encodedAuth . self::HTTP_EOL; } // END - if @@ -246,7 +246,7 @@ class ConsoleTools extends BaseFrameworkSystem { $helperInstance = new ConsoleTools(); // Get SplFileInfo instance - $infoInstance = new SplFileInfo($helperInstance->getConfigInstance()->getConfigEntry('hostname_file')); + $infoInstance = new SplFileInfo(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('hostname_file')); try { // Get a file pointer @@ -318,10 +318,10 @@ class ConsoleTools extends BaseFrameworkSystem { // Open connection if ($helperInstance->isProxyUsed() === true) { // Resolve hostname into IP address - $ipAddress = self::resolveIpAddress($helperInstance->getConfigInstance()->getConfigEntry('proxy_host')); + $ipAddress = self::resolveIpAddress(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('proxy_host')); // Connect to host through proxy connection - $socketResource = fsockopen($ipAddress, $helperInstance->getConfigInstance()->getConfigEntry('proxy_port'), $errorNo, $errorStr, 30); + $socketResource = fsockopen($ipAddress, FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('proxy_port'), $errorNo, $errorStr, 30); } else { // Connect to host directly $socketResource = fsockopen('188.138.90.169', 80, $errorNo, $errorStr, 30); @@ -342,7 +342,7 @@ class ConsoleTools extends BaseFrameworkSystem { // Do we use proxy? if ($helperInstance->isProxyUsed() === true) { // CONNECT method? - if ($helperInstance->getConfigInstance()->getConfigEntry('proxy_connect_method') == 'Y') { + if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('proxy_connect_method') == 'Y') { // Setup proxy tunnel $response = $helperInstance->setupProxyTunnel('shipsimu.org', 80, $socketResource); diff --git a/framework/main/classes/user/class_BaseUser.php b/framework/main/classes/user/class_BaseUser.php index 7a18a816..65fcd5a3 100644 --- a/framework/main/classes/user/class_BaseUser.php +++ b/framework/main/classes/user/class_BaseUser.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\User; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Database\Frontend\User\UserDatabaseWrapper; use Org\Mxchange\CoreFramework\Database\Updateable; use Org\Mxchange\CoreFramework\Factory\ObjectFactory; @@ -350,7 +351,7 @@ abstract class BaseUser extends BaseFrameworkSystem implements Updateable { */ public function isConfirmed () { // Determine it - $isConfirmed = ($this->getField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) == $this->getConfigInstance()->getConfigEntry('user_status_confirmed')); + $isConfirmed = ($this->getField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) == FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('user_status_confirmed')); // Return it return $isConfirmed; @@ -363,7 +364,7 @@ abstract class BaseUser extends BaseFrameworkSystem implements Updateable { */ public function isGuest () { // Determine it - $isGuest = ($this->getField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) == $this->getConfigInstance()->getConfigEntry('user_status_guest')); + $isGuest = ($this->getField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) == FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('user_status_guest')); // Return it return $isGuest; diff --git a/framework/main/classes/user/member/class_Member.php b/framework/main/classes/user/member/class_Member.php index a187f948..64b7cbbf 100644 --- a/framework/main/classes/user/member/class_Member.php +++ b/framework/main/classes/user/member/class_Member.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\User\Login; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Database\Frontend\User\UserDatabaseWrapper; use Org\Mxchange\CoreFramework\Factory\ObjectFactory; use Org\Mxchange\CoreFramework\Manager\Login\ManageableMember; @@ -131,7 +132,7 @@ class Member extends BaseUser implements ManageableMember, Registerable { // If there is no action use the default on if (is_null($lastAction)) { - $lastAction = $this->getConfigInstance()->getConfigEntry('login_default_action'); + $lastAction = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('login_default_action'); } // END - if // Get a critieria instance diff --git a/framework/main/exceptions/crypto/class_EncryptInvalidLengthException.php b/framework/main/exceptions/crypto/class_EncryptInvalidLengthException.php index 3980444e..0ee59605 100644 --- a/framework/main/exceptions/crypto/class_EncryptInvalidLengthException.php +++ b/framework/main/exceptions/crypto/class_EncryptInvalidLengthException.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Deprecated; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Filter\Filterable; use Org\Mxchange\CoreFramework\Generic\FrameworkException; @@ -39,7 +40,7 @@ class EncryptInvalidLengthException extends FrameworkException { */ public function __construct (Filterable $filterInstance, $code) { // Get length - $length = $filterInstance->getConfigInstance()->getConfigEntry('captcha_string_length'); + $length = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('captcha_string_length'); // Construct message $message = sprintf('[%s:%d] Encrypt string has an invalid length. Valid: %d', diff --git a/framework/main/middleware/compressor/class_CompressorChannel.php b/framework/main/middleware/compressor/class_CompressorChannel.php index 4c425d7b..50309aee 100644 --- a/framework/main/middleware/compressor/class_CompressorChannel.php +++ b/framework/main/middleware/compressor/class_CompressorChannel.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Middleware\Compressor; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Compressor\Compressor; use Org\Mxchange\CoreFramework\Factory\ObjectFactory; use Org\Mxchange\CoreFramework\Middleware\BaseMiddleware; @@ -62,8 +63,8 @@ class CompressorChannel extends BaseMiddleware implements Registerable { ) { // Init base directory $baseDir = - $compressorInstance->getConfigInstance()->getConfigEntry('framework_base_path') . - $compressorInstance->getConfigInstance()->getConfigEntry('compressor_base_path'); + FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('framework_base_path') . + FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('compressor_base_path'); // Get a directory pointer $directoryInstance = ObjectFactory::createObjectByConfiguredName('directory_class', array($baseDir)); diff --git a/framework/main/tests/filter/tests/configuration/classes/class_TestConfigurationLoadableClassesFilter.php b/framework/main/tests/filter/tests/configuration/classes/class_TestConfigurationLoadableClassesFilter.php index 0f147e23..1ac60824 100644 --- a/framework/main/tests/filter/tests/configuration/classes/class_TestConfigurationLoadableClassesFilter.php +++ b/framework/main/tests/filter/tests/configuration/classes/class_TestConfigurationLoadableClassesFilter.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Tests\Filter\Configuration\Classes; // Import framework stuff +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Filter\Filterable; use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; @@ -71,7 +72,7 @@ class TestConfigurationLoadableClassesFilter extends BaseTestsFilter implements $failed = 0; // Loop through all configuration keys - foreach ($this->getConfigInstance()->getConfigurationArray() as $configKey => $configValue) { + foreach (FrameworkBootstrap::getConfigurationInstance()->getConfigurationArray() as $configKey => $configValue) { // Key must end with _class if (substr($configKey, -6, 6) != '_class') { // Skip this -- 2.39.2