Continued:
authorRoland Häder <roland@mxchange.org>
Sat, 7 Nov 2020 12:50:56 +0000 (13:50 +0100)
committerRoland Häder <roland@mxchange.org>
Sat, 7 Nov 2020 12:54:37 +0000 (13:54 +0100)
- BaseFrameworkSystem-><get|set>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

Signed-off-by: Roland Häder <roland@mxchange.org>
57 files changed:
framework/main/classes/class_BaseFrameworkSystem.php
framework/main/classes/client/http/class_HttpClient.php
framework/main/classes/commands/html/class_HtmlLoginAreaCommand.php
framework/main/classes/commands/html/class_HtmlResendLinkCommand.php
framework/main/classes/criteria/class_BaseCriteria.php
framework/main/classes/criteria/search/class_SearchCriteria.php
framework/main/classes/crypto/class_CryptoHelper.php
framework/main/classes/database/backend/lfdb_legacy/class_CachedLocalFileDatabase.php
framework/main/classes/database/class_BaseDatabaseWrapper.php
framework/main/classes/factories/cache/class_CacheFactory.php
framework/main/classes/factories/html/class_HtmlNewsFactory.php
framework/main/classes/file_directories/binary/class_BaseBinaryFile.php
framework/main/classes/filter/auth/class_UserAuthFilter.php
framework/main/classes/filter/crypto/class_CaptchaEncryptFilter.php
framework/main/classes/filter/guest/class_UserNameIsGuestFilter.php
framework/main/classes/filter/update/class_UserStatusConfimedUpdateFilter.php
framework/main/classes/filter/validator/class_EmailValidatorFilter.php
framework/main/classes/filter/validator/class_UserNameValidatorFilter.php
framework/main/classes/filter/verifier/class_GraphicalCodeCaptchaVerifierFilter.php
framework/main/classes/filter/verifier/class_UserGuestVerifierFilter.php
framework/main/classes/filter/verifier/class_UserNameVerifierFilter.php
framework/main/classes/filter/verifier/class_UserStatusVerifierFilter.php
framework/main/classes/filter/verifier/class_UserUnconfirmedVerifierFilter.php
framework/main/classes/handler/tasks/class_TaskHandler.php
framework/main/classes/helper/captcha/web/class_GraphicalCodeCaptcha.php
framework/main/classes/helper/html/blocks/class_HtmlBlockHelper.php
framework/main/classes/helper/html/forms/class_HtmlFormHelper.php
framework/main/classes/helper/html/links/class_HtmlLinkHelper.php
framework/main/classes/iterator/registry/class_RegistryIterator.php
framework/main/classes/language/class_LanguageSystem.php
framework/main/classes/mailer/class_BaseMailer.php
framework/main/classes/menu/class_BaseMenu.php
framework/main/classes/output/debug/console/class_DebugConsoleOutput.php
framework/main/classes/output/web/class_WebOutput.php
framework/main/classes/points/class_UserPoints.php
framework/main/classes/resolver/action/html/class_HtmlActionResolver.php
framework/main/classes/resolver/class_BaseResolver.php
framework/main/classes/resolver/command/class_BaseCommandResolver.php
framework/main/classes/resolver/controller/class_BaseControllerResolver.php
framework/main/classes/response/class_BaseResponse.php
framework/main/classes/response/html/class_HtmlResponse.php
framework/main/classes/response/image/class_ImageResponse.php
framework/main/classes/rng/class_RandomNumberGenerator.php
framework/main/classes/stacker/class_BaseStacker.php
framework/main/classes/tasks/idle/class_IdleLoopTask.php
framework/main/classes/template/class_BaseTemplateEngine.php
framework/main/classes/template/console/class_ConsoleTemplateEngine.php
framework/main/classes/template/html/class_HtmlTemplateEngine.php
framework/main/classes/template/image/class_ImageTemplateEngine.php
framework/main/classes/template/mail/class_MailTemplateEngine.php
framework/main/classes/template/menu/class_MenuTemplateEngine.php
framework/main/classes/tools/console/class_ConsoleTools.php
framework/main/classes/user/class_BaseUser.php
framework/main/classes/user/member/class_Member.php
framework/main/exceptions/crypto/class_EncryptInvalidLengthException.php
framework/main/middleware/compressor/class_CompressorChannel.php
framework/main/tests/filter/tests/configuration/classes/class_TestConfigurationLoadableClassesFilter.php

index 88168c533054e2bcc3f3fc2867fa3b8d0b4ae85d..725b1034390727329fa208f474c7a4c2a8ec1316 100644 (file)
@@ -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
 
index 61c59b823ed53bbd0d5a5aeac6c4c0f20615fb61..a1b26093d661a0607669ac0788f3eee7e0425302 100644 (file)
@@ -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
 
index f0035813eab0756ce5b95e4e1ae3381c3cecb090..0adfc32b05d2169177677a955798a6cb633966ea 100644 (file)
@@ -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');
index d11c7cf88da2109fef4ceb1c6d48fb564316e8ae..db4c68772222151418efc24eab606dd9dda90568 100644 (file)
@@ -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);
index 57287b5bfb4a8fd8c6ebad895ad1632ae812b634..3a75071dba6f622ade6e09935583f1c3bbf00b40 100644 (file)
@@ -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);
        }
 
index f2fabf21255869935312fc404cf292306d0c01b0..6f9f2aa58a6007ae9bd5e38a71d27b33c06eeb06 100644 (file)
@@ -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);
        }
 
index 8ac7435e3998fe6c693280447cc79dfc951fda1d..96eb2f9dd7191adbc5f7ec46f636131debfb5ffd 100644 (file)
@@ -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."<br />\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
                        ));
index be670d26fd493bfb487c09d08be26bd2b2f11152..91aa9ac5548ea150a320228266ffd7fa7817b4b8 100644 (file)
@@ -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 {
index 7a55a482c90cd17d1ce955972b4914c02d885af0..f9414067b473f2974c41651eceea26401d7a9796 100644 (file)
@@ -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);
index 8434765384a1233468a043b18d3fe4088a20d8b8..45877c4d9b4096aecbdc9800887ba9d6ee7ebb2d 100644 (file)
@@ -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);
index fb203701d8b751abbd32af64d283464b7a17bc64..da522134ef2a620be0cf5164184ea5e5c232af35 100644 (file)
@@ -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));
index 202fe8fdfe0cd6706675f7f2ebb7e746057f5c3f..238c3930fb4ec99361514a9a2ec22f92369a6fde 100644 (file)
@@ -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.
index 180ac93e0d9cbe12fab329b82d7bb2820b9fbce5..a7f0631be5bd42749c10e6bff10bf18f4316dfe0 100644 (file)
@@ -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
 
index bf21b9b5a6ae3f5f4af02f0444dc56f4c0b15955..98871b8f982f42f05aef1f3f088f6c42af1e8ddb 100644 (file)
@@ -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);
 
index 0136b3a64bb70caa3271ca87f18aea571755d870..890f56f4f1d8611939b94b49410666b3ff43ee15 100644 (file)
@@ -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
        }
 
index cb94e5dfe26a3d6be9878719bf9fe0bb1f19b2a4..8eb0cb6066444da2f0ee30ef9e7752b7c7d3358b 100644 (file)
@@ -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);
index 3c0aad9f13b892572297235fcd197c7d47dd9b4a..4f4ae4d0d728d3d80dc96d948728fc669395a2ae 100644 (file)
@@ -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);
index e576d094495cfc5faf9603ac5df019df1dc4ef18..29190408fcdcb4755c2aea1606541b073af766b3 100644 (file)
@@ -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);
index c1031f314db495c6a34b9fee03180e46eaeedaf7..b88f4bb98a5833d79a004dcfea90720c5e8194ad 100644 (file)
@@ -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
index 6f3a4b00a2b9e4ed4599efc7bce2ef9f4eab8b59..cca45ec6c1f61692f869b38144a352f3bbdf91a4 100644 (file)
@@ -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);
index 6ffd16d5d37e03a02f7709bb2b7da41d97abd77e..d2e71f90b17e219fc9099df3e12900710ee0e691 100644 (file)
@@ -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);
index 52d07d3430e0e7436b97a0c6a27808a7465addc9..7ef1ab67282441de5c877fb534d9c73c044e2532 100644 (file)
@@ -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);
 
index 70094895d335b8d6c5944cd16c77a1499f9ff79e..94acdfc559c661035dd8386ae7335ca69176cde6 100644 (file)
@@ -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);
 
index fbfa2d420b14fd6b261098f3868c7085f113d87e..8ef6ffda24aeff1ba076333e2ec698ea7879aabe 100644 (file)
@@ -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
index 84f0d7111654ad5ca09cc6af8cde349671cc2d25..4a229c0f33cbda5ebf0f3be31353877701bf1adb 100644 (file)
@@ -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();
index 81339453bbc734a6e46f9856fbdd01d21ba29278..d0d6177fd7ca962e972fdac0132b6a56a2b7be85 100644 (file)
@@ -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;
        }
 
index 481616fd66a227a902d497c87cf2b7580c062363..9273cdf2055b408a56e848df39b116bd536fec65 100644 (file)
@@ -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("<form name=\"%s\" class=\"forms\" action=\"%s/%s\" method=\"%s\" target=\"%s\" id=\"%s_form\">",
                                $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."<br />\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;
        }
 
index 58749f72c7a7586ed52f04a6f63ccf456cdc3206..caba4ff11b7e82e2758627e87c7870332d7df561 100644 (file)
@@ -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?
index 58316c9fe8df602697a2aa4cd1a6dea511574d10..c042707f6db8f4c3e6f96ee4c02b274ab8b00673 100644 (file)
@@ -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
         *
index bb3c76db810e3560cbbd93e1adb9bd6e103ac8b6..4a1c0fd06c705da1f095e74fd5213492c6a92eff 100644 (file)
@@ -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
index 540c9fc095f7eda28cedbe79ee66f7cc3445b690..48d37b6a4c7be3e03ba29526206a675c37ae2c71 100644 (file)
@@ -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);
index 4c4adee81fe3d36c37fde2d041842e133e08c27a..970800a0283cea5671cd83df8672abe1ca74141f 100644 (file)
@@ -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
index d109455a56df44a197696d7f508aac3d5663f8b9..75abd9872d7a09234f684dfc7d3a91706d490c20 100644 (file)
@@ -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
index 52dd69590cbcc221664c7e71fc7d0499c1792097..89f8d0550b41f6ff2ed5f54ffd242f3cce8abea6 100644 (file)
@@ -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)) {
index fdab0b49a0b435f7f31e80665ebb7fd17ab6a10d..0d9c329d1964f8eecc6a73539288738d666957ee 100644 (file)
@@ -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();
index 7f77fb11f3e1c4f8acdd31d1cb3b3b68d2a28967..52a39c63afb5f5f6935b1dac88f10dd00aa20fb3 100644 (file)
@@ -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
index 56f2c4dd0e9a791823e96200a0605aa60b1ea9f9..432cb562544f632d8ec162d76a8d32386b1d23fc 100644 (file)
@@ -30,6 +30,12 @@ use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 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
         *
index 4dd1861efab2bc83f0d8c0ddb218beaac2b2dc45..2b319c1b508dd743e805da20884e84f2e386b7d0 100644 (file)
@@ -37,6 +37,11 @@ use \UnexpectedValueException;
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 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
index c47e4df2fa825106fe248ab5fcd74c19766ba712..3f24811aff1fe6ce43d980fe24d813a0ded02ae5 100644 (file)
@@ -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 <http://www.gnu.org/licenses/>.
  */
 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(
index b15b370d86b5eebc2095d3be34314d24284fc32d..cb5d984944b2d951cf0eedb0f355d4e457feeaaf 100644 (file)
@@ -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;
index 2e84655b4e64c5296fa84124035c4d4d049b7b91..62cf8800c972c01720de9555206b1181aa4dbcf4 100644 (file)
@@ -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
index 3d54e6a4c01041333f3d5c9a6d8eee64041f0393..8be1d27c4da8dc830525265d69f9ac58f9bb73e8 100644 (file)
@@ -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
index c3f09d9400aa7a5239416dff98bdf279b2700cfb..12d481329dc1560a7a79b006dae444bf9c57eba7 100644 (file)
@@ -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
 
index 9cfb1655e5f56696dee208623e58ca7273c0e1c4..715dd24cb0ebc2d700aad2df66c0a8b2356a9349 100644 (file)
@@ -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;
index f247de2d23086b806f25cb989388b80b66aa0509..975721cc4102078b5c5d5610d589a53c7a04f975 100644 (file)
@@ -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');
        }
 
        /**
index 2460e54cdd9b637894145be3e4bf009e3c93c5f6..fa0be9e4418b657bb69370b3f5652dac0607ec17 100644 (file)
@@ -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.
index a3132e8146269629d432705c1b58a8a884dda175..a718d80d5a1dce0e442d0b244db61ad2a670f60d 100644 (file)
@@ -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
index b8c3a01c216415b4fc149aa8b6272317b88bf7b9..32513179b02c6f459afc448351117445f30e717a 100644 (file)
@@ -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
index 33f9001595c04da74ff4c48120ae318ac733ce4e..1ef96f6d2503e1a855c03303c626007068142167 100644 (file)
@@ -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);
index bd409dbe20c6d18aaf52b8c2fac04326235f5efc..e68a66e64ebc722ff4378a104476d552be71db9a 100644 (file)
@@ -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
index eea9843647313c20aa7038c7c930d0628b9bbf47..0bc2e03e521f7203cc50a4b74aae0d82e1b507df 100644 (file)
@@ -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() . ':' .
index 4cddfca2ed40d7095d898de05842d1b9c5aa7307..d4c7b728fa5b7d6f8b17d2396b05781da8963148 100644 (file)
@@ -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);
 
index 7a18a8168f289aec63639ef76868dc88ab240727..65fcd5a348ec989eeabfa04719b62ffd0d9dd932 100644 (file)
@@ -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;
index a187f948975866dd52407a86aa392de3dcee94ca..64b7cbbf31adec8bb9cd9f07dd4ecb7b3cf9fd32 100644 (file)
@@ -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
index 3980444e9078b18cdffb3f098a3521d151156a3f..0ee59605f664d902ca2b4ca9c3151be4b25d1a8b 100644 (file)
@@ -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',
index 4c425d7b5d44489a973f297c78eba7b859aa9c72..50309aee9b27ceb36956127406eee7f8cc45b72b 100644 (file)
@@ -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));
index 0f147e232654677ca2e9782ece82bb69cb689802..1ac6082453ae94f0de0e1c9fd0243967b700785a 100644 (file)
@@ -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