readConfig() is not naming convention, renamed to getConfigEntry()
authorRoland Häder <roland@mxchange.org>
Tue, 28 Jul 2009 17:19:56 +0000 (17:19 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 28 Jul 2009 17:19:56 +0000 (17:19 +0000)
65 files changed:
inc/classes/exceptions/crypto/class_EncryptInvalidLengthException.php
inc/classes/main/class_BaseFrameworkSystem.php
inc/classes/main/commands/web/class_WebLoginAreaCommand.php
inc/classes/main/commands/web/class_WebResendLinkCommand.php
inc/classes/main/criteria/dataset/class_DataSetCriteria.php
inc/classes/main/criteria/search/class_SearchCriteria.php
inc/classes/main/criteria/update/class_UpdateCriteria.php
inc/classes/main/crypto/class_CryptoHelper.php
inc/classes/main/database/databases/class_LocalFileDatabase.php
inc/classes/main/factories/cache/class_CacheFactory.php
inc/classes/main/factories/objects/class_ObjectFactory.php
inc/classes/main/factories/web/class_WebNewsFactory.php
inc/classes/main/filter/auth/class_UserAuthFilter.php
inc/classes/main/filter/crypto/class_CaptchaEncryptFilter.php
inc/classes/main/filter/guest/class_UserNameIsGuestFilter.php
inc/classes/main/filter/update/class_UserStatusConfimedUpdateFilter.php
inc/classes/main/filter/validator/class_EmailValidatorFilter.php
inc/classes/main/filter/validator/class_UserNameValidatorFilter.php
inc/classes/main/filter/verifier/class_UserGuestVerifierFilter.php
inc/classes/main/filter/verifier/class_UserNameVerifierFilter.php
inc/classes/main/filter/verifier/class_UserStatusVerifierFilter.php
inc/classes/main/filter/verifier/class_UserUnconfirmedVerifierFilter.php
inc/classes/main/helper/captcha/web/class_GraphicalCodeCaptcha.php
inc/classes/main/helper/web/blocks/class_WebBlockHelper.php
inc/classes/main/helper/web/class_BaseWebHelper.php
inc/classes/main/helper/web/forms/class_WebFormHelper.php
inc/classes/main/helper/web/links/class_WebLinkHelper.php
inc/classes/main/language/class_LanguageSystem.php
inc/classes/main/mailer/class_BaseMailer.php
inc/classes/main/output/class_ConsoleOutput.php
inc/classes/main/points/class_UserPoints.php
inc/classes/main/reader/class_ConsoleNewsReader.php
inc/classes/main/reader/class_DefaultNewsReader.php
inc/classes/main/resolver/action/web/class_WebActionResolver.php
inc/classes/main/resolver/command/console/class_ConsoleCommandResolver.php
inc/classes/main/resolver/command/image/class_ImageCommandResolver.php
inc/classes/main/resolver/command/web/class_WebCommandResolver.php
inc/classes/main/resolver/controller/class_BaseControllerResolver.php
inc/classes/main/response/class_BaseResponse.php
inc/classes/main/response/console/class_ConsoleResponse.php
inc/classes/main/response/http/class_HttpResponse.php
inc/classes/main/response/image/class_ImageResponse.php
inc/classes/main/rng/class_RandomNumberGenerator.php
inc/classes/main/template/class_BaseTemplateEngine.php
inc/classes/main/template/image/class_ImageTemplateEngine.php
inc/classes/main/template/mail/class_MailTemplateEngine.php
inc/classes/main/template/menu/class_MenuTemplateEngine.php
inc/classes/main/template/web/class_WebTemplateEngine.php
inc/classes/main/user/member/class_Member.php
inc/config.php
inc/config/class_FrameworkConfiguration.php
inc/database.php
inc/database/lib-local.php
inc/includes.php
inc/language.php
inc/loader/class_ClassLoader.php
inc/output.php
inc/selector.php
tests/ConfigTest.php
tests/RegistryTest.php
tests/RequestTest.php
tests/Test.php
tests/old/contract-test.php
tests/old/loader-test.php
tests/old/personell-test.php

index ceebf3b..63c6c2e 100644 (file)
@@ -31,7 +31,7 @@ class EncryptInvalidLengthException extends FrameworkException {
         */
        public function __construct(Filterable $filterInstance, $code) {
                // Get length
-               $length = $filterInstance->getConfigInstance()->readConfig('captcha_string_length');
+               $length = $filterInstance->getConfigInstance()->getConfigEntry('captcha_string_length');
 
                // Construct message
                $message = sprintf("[%s:%d] Encrypt string has an invalid length. Valid: %d",
index 9f5ede1..5fb9912 100644 (file)
@@ -270,19 +270,19 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                        $this->setConfigInstance(FrameworkConfiguration::getInstance());
 
                        // Add application helper to our class
-                       $this->systemclasses[] = $this->getConfigInstance()->readConfig('app_helper_class');
+                       $this->systemclasses[] = $this->getConfigInstance()->getConfigEntry('app_helper_class');
 
                        // Set debug instance
-                       $this->setDebugInstance(DebugMiddleware::createDebugMiddleware($this->getConfigInstance()->readConfig('debug_class')));
+                       $this->setDebugInstance(DebugMiddleware::createDebugMiddleware($this->getConfigInstance()->getConfigEntry('debug_class')));
 
                        // Get output instance and set it
-                       $outputInstance = ObjectFactory::createObjectByConfiguredName('output_class', array($this->getConfigInstance()->readConfig('web_content_type')));
+                       $outputInstance = ObjectFactory::createObjectByConfiguredName('output_class', array($this->getConfigInstance()->getConfigEntry('web_content_type')));
                        $this->setWebOutputInstance($outputInstance);
 
                        // Set the compressor channel
                        $this->setCompressorChannel(CompressorChannel::createCompressorChannel(
-                               $this->getConfigInstance()->readConfig('base_path').
-                               $this->getConfigInstance()->readConfig('compressor_base_path')
+                               $this->getConfigInstance()->getConfigEntry('base_path').
+                               $this->getConfigInstance()->getConfigEntry('compressor_base_path')
                        ));
 
                        // Initialization done! :D
@@ -968,7 +968,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                                        $timeArray = explode(':', $dateTime[1]);
 
                                        // Construct the timestamp
-                                       $readable = sprintf($this->getConfigInstance()->readConfig('german_date_time'),
+                                       $readable = sprintf($this->getConfigInstance()->getConfigEntry('german_date_time'),
                                                $dateArray[0],
                                                $dateArray[1],
                                                $dateArray[2],
index 673858d..8eb65a9 100644 (file)
@@ -163,7 +163,7 @@ class WebLoginAreaCommand extends BaseCommand implements Commandable {
                $appInstance = $registryInstance->getInstance('application');
 
                // Default action is the one from configuration
-               $this->actionName = $this->convertDashesToUnderscores($appInstance->getAppShortName()) . '_login_' . $this->getConfigInstance()->readConfig('login_default_action');
+               $this->actionName = $this->convertDashesToUnderscores($appInstance->getAppShortName()) . '_login_' . $this->getConfigInstance()->getConfigEntry('login_default_action');
 
                // Get "action" from request
                $actReq = $requestInstance->getRequestElement('action');
index f1b5b30..73aa535 100644 (file)
@@ -86,7 +86,7 @@ class WebResendLinkCommand extends BaseCommand implements Commandable {
                $userInstance->updateDatabaseField(UserDatabaseWrapper::DB_COLUMN_CONFIRM_HASH, $hashedString);
 
                // Re-set config entry to mailer engine
-               $this->getConfigInstance()->setConfigEntry('template_class', $this->getConfigInstance()->readConfig('mail_template_class'));
+               $this->getConfigInstance()->setConfigEntry('template_class', $this->getConfigInstance()->getConfigEntry('mail_template_class'));
 
                // Prepare the template engine
                $templateInstance = $this->prepareTemplateInstance($appInstance);
index c7423cd..bcce242 100644 (file)
@@ -90,7 +90,7 @@ class DataSetCriteria extends BaseCriteria implements StoreableCriteria {
         */
        public function addConfiguredCriteria ($criteriaKey, $configEntry) {
                // Add configuration entry as criteria
-               $value = $this->getConfigInstance()->readConfig($configEntry);
+               $value = $this->getConfigInstance()->getConfigEntry($configEntry);
                $this->addCriteria($criteriaKey, $value);
        }
 
index 936200a..09e6143 100644 (file)
@@ -82,7 +82,7 @@ class SearchCriteria extends BaseCriteria implements LocalSearchCriteria {
         */
        public final function addConfiguredCriteria ($criteriaKey, $configEntry) {
                // Add the configuration entry as a criteria
-               $value = $this->getConfigInstance()->readConfig($configEntry);
+               $value = $this->getConfigInstance()->getConfigEntry($configEntry);
                $this->addCriteria($criteriaKey, $value);
        }
 
index 43b5d8f..3166134 100644 (file)
@@ -82,7 +82,7 @@ class UpdateCriteria extends BaseCriteria implements LocalUpdateCriteria {
         */
        public function addConfiguredCriteria ($criteriaKey, $configEntry) {
                // Add the configuration entry as a criteria
-               $value = $this->getConfigInstance()->readConfig($configEntry);
+               $value = $this->getConfigInstance()->getConfigEntry($configEntry);
                $this->addCriteria($criteriaKey, $value);
        }
 
index ed0c179..34480b4 100644 (file)
@@ -115,7 +115,7 @@ class CryptoHelper extends BaseFrameworkSystem implements Cryptable {
                $randomString = $this->rngInstance->randomString();
 
                // Get config entry for salt length
-               $length = $this->getConfigInstance()->readConfig('salt_length');
+               $length = $this->getConfigInstance()->getConfigEntry('salt_length');
 
                // Keep only defined number of characters
                $this->salt = substr(sha1($randomString), -$length, $length);
@@ -141,7 +141,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()->readConfig('salt_length');
+                       $length = $this->getConfigInstance()->getConfigEntry('salt_length');
 
                        // Then extract the X first characters from the hash as our salt
                        $salt = substr($oldHash, 0, $length);
@@ -149,7 +149,7 @@ class CryptoHelper extends BaseFrameworkSystem implements Cryptable {
 
                // Hash the password with salt
                //* DEBUG: */ echo "salt=".$salt."/plain=".$str."<br />\n";
-               $hashed = $salt . md5(sprintf($this->getConfigInstance()->readConfig('hash_mask'),
+               $hashed = $salt . md5(sprintf($this->getConfigInstance()->getConfigEntry('hash_mask'),
                        $salt,
                        $this->rngInstance->getFixedSalt(),
                        $str
@@ -171,7 +171,7 @@ class CryptoHelper extends BaseFrameworkSystem implements Cryptable {
                $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
 
                // Get key
-               if ($this->getConfigInstance()->readConfig('crypt_fixed_salt') == 'Y') {
+               if ($this->getConfigInstance()->getConfigEntry('crypt_fixed_salt') == 'Y') {
                        $key = md5($this->rngInstance->getFixedSalt());
                } else {
                        $key = md5($this->rngInstance->getExtraSalt());
@@ -235,7 +235,7 @@ class CryptoHelper extends BaseFrameworkSystem implements Cryptable {
                $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
 
                // Get key
-               if ($this->getConfigInstance()->readConfig('crypt_fixed_salt') == 'Y') {
+               if ($this->getConfigInstance()->getConfigEntry('crypt_fixed_salt') == 'Y') {
                        $key = md5($this->rngInstance->getFixedSalt());
                } else {
                        $key = md5($this->rngInstance->getExtraSalt());
index 1c03a52..78375f6 100644 (file)
@@ -333,7 +333,7 @@ class LocalFileDatabase extends BaseDatabaseFrontend implements DatabaseFrontend
                if (!isset($this->tableInfo['primary'])) {
                        // Then create the info file
                        $this->createTableInfoFile($dataSetInstance);
-               } elseif (($this->getConfigInstance()->readConfig('db_update_primary_forced') == 'Y') && ($dataSetInstance->getPrimaryKey() != $this->tableInfo['primary'])) {
+               } elseif (($this->getConfigInstance()->getConfigEntry('db_update_primary_forced') == 'Y') && ($dataSetInstance->getPrimaryKey() != $this->tableInfo['primary'])) {
                        // Set the array element
                        $this->tableInfo[$dataSetInstance->getTableName()]['primary'] = $dataSetInstance->getPrimaryKey();
 
index 5e169fb..33619ba 100644 (file)
@@ -60,7 +60,7 @@ class CacheFactory extends BaseFactory {
         */
        public function createConfiguredCache () {
                // Read the config entry
-               $cacheType = $this->getConfigInstance()->readConfig('cache_class');
+               $cacheType = $this->getConfigInstance()->getConfigEntry('cache_class');
 
                // And get a new instance
                $cacheInstance = ObjectFactory::createObjectByName($cacheType);
index 874d140..e3be9d2 100644 (file)
@@ -85,7 +85,7 @@ class ObjectFactory extends BaseFactory {
         */
        public final static function createObjectByConfiguredName ($configEntry, array $args=array()) {
                // Read the configuration entry
-               $className = FrameworkConfiguration::getInstance()->readConfig($configEntry);
+               $className = FrameworkConfiguration::getInstance()->getConfigEntry($configEntry);
 
                // Send this to the other factory...
                $objectInstance = self::createObjectByName($className, $args);
index 304d5a1..1c2906e 100644 (file)
@@ -67,7 +67,7 @@ class WebNewsFactory extends BaseFactory {
                } // END - if
 
                // Get the news reader class name from config
-               $className = $requestInstance->getConfigInstance()->readConfig($configEntry);
+               $className = $requestInstance->getConfigInstance()->getConfigEntry($configEntry);
 
                // Once we have that name, try to load initialize it
                $newsInstance = ObjectFactory::createObjectByName($className, array($requestInstance));
index 4b9e0dd..7745492 100644 (file)
@@ -62,7 +62,7 @@ class UserAuthFilter extends BaseFilter implements Filterable {
         * @return      void
         */
        protected function setDefaultAuthMethod () {
-               $this->authMethod = $this->getConfigInstance()->readConfig('auth_method_class');
+               $this->authMethod = $this->getConfigInstance()->getConfigEntry('auth_method_class');
        }
 
        /**
@@ -102,13 +102,13 @@ class UserAuthFilter extends BaseFilter implements Filterable {
                } // END - if
 
                // Regular user account
-               $className = $this->getConfigInstance()->readConfig('user_class');
+               $className = $this->getConfigInstance()->getConfigEntry('user_class');
                $methodName = 'createMemberByUserName';
 
                // Now, try to get a user or guest instance
-               if ($authLogin == $this->getConfigInstance()->readConfig('guest_login_user')) {
+               if ($authLogin == $this->getConfigInstance()->getConfigEntry('guest_login_user')) {
                        // Set class
-                       $className = $this->getConfigInstance()->readConfig('guest_class');
+                       $className = $this->getConfigInstance()->getConfigEntry('guest_class');
                        $methodName = 'createGuestByUserName';
                } // END - if
 
index 13ed760..99fc84c 100644 (file)
@@ -73,7 +73,7 @@ class CaptchaEncryptFilter extends BaseFilter implements Filterable {
                $decryptedString = ObjectFactory::createObjectByConfiguredName('crypto_class')->decryptString($encryptDecoded);
 
                // Is it the expected length?
-               if (strlen($decryptedString) != $this->getConfigInstance()->readConfig('captcha_string_length')) {
+               if (strlen($decryptedString) != $this->getConfigInstance()->getConfigEntry('captcha_string_length')) {
                        // Not found, so request is invalid
                        $requestInstance->requestIsValid(false);
 
index 1d2c4eb..518b171 100644 (file)
@@ -58,10 +58,10 @@ class UserNameIsGuestFilter extends BaseFilter implements Filterable {
                $userName = $requestInstance->getRequestElement('username');
 
                // Does the user name match the guest login?
-               if ($userName == $this->getConfigInstance()->readConfig('guest_login_user')) {
+               if ($userName == $this->getConfigInstance()->getConfigEntry('guest_login_user')) {
                        // Then set the password to the configured password
-                       $requestInstance->setRequestElement('pass1', $this->getConfigInstance()->readConfig('guest_login_passwd'));
-                       $requestInstance->setRequestElement('pass2', $this->getConfigInstance()->readConfig('guest_login_passwd'));
+                       $requestInstance->setRequestElement('pass1', $this->getConfigInstance()->getConfigEntry('guest_login_passwd'));
+                       $requestInstance->setRequestElement('pass2', $this->getConfigInstance()->getConfigEntry('guest_login_passwd'));
                } // END - if
        }
 }
index a59e505..5b94ec2 100644 (file)
@@ -57,7 +57,7 @@ class UserStatusConfimedUpdateFilter extends BaseFilter implements Filterable {
                $userInstance = Registry::getRegistry()->getInstance('user');
 
                // Get "confirmed" status from config
-               $confirmed = $this->getConfigInstance()->readConfig('user_status_confirmed');
+               $confirmed = $this->getConfigInstance()->getConfigEntry('user_status_confirmed');
 
                // Update the user status to "confirmed" here
                $userInstance->updateDatabaseField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS, $confirmed);
index 7d31503..8ec637c 100644 (file)
@@ -61,7 +61,7 @@ class EmailValidatorFilter extends BaseFilter implements Filterable {
                $email = $requestInstance->getRequestElement('email');
 
                // Is the Email set?
-               if ((is_null($email)) || ($this->getConfigInstance()->readConfig('register_email_unique') == 'Y')) {
+               if ((is_null($email)) || ($this->getConfigInstance()->getConfigEntry('register_email_unique') == 'Y')) {
                        // Try it again
                        $email1 = $requestInstance->getRequestElement('email1');
                        $email2 = $requestInstance->getRequestElement('email2');
@@ -148,7 +148,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()->readConfig('user_class'), 'createMemberByEmail'), array($email));
+                       $userInstance = call_user_func_array(array($this->getConfigInstance()->getConfigEntry('user_class'), 'createMemberByEmail'), array($email));
 
                        // Remember this user instance in our registry for later usage
                        $registry->addInstance('user', $userInstance);
index 19ffd9b..1d13472 100644 (file)
@@ -115,7 +115,8 @@ 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()->readConfig('user_class'), 'createMemberByUsername'), array($userName));
+
+                               $userInstance = call_user_func_array(array($this->getConfigInstance()->getConfigEntry('user_class'), 'createMemberByUsername'), array($userName));
 
                                // Remember this user instance in our registry for later usage
                                $registry->addInstance('user', $userInstance);
index 163ecff..9fee920 100644 (file)
@@ -118,7 +118,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()->readConfig('guest_class'), 'createGuestByUsername'), array($userName));
+                               $userInstance = call_user_func_array(array($this->getConfigInstance()->getConfigEntry('guest_class'), 'createGuestByUsername'), array($userName));
 
                                // Remember this user instance in our registry for later usage
                                $registry->addInstance('user', $userInstance);
index 50719fe..b43b7f1 100644 (file)
@@ -115,7 +115,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()->readConfig('user_class'), 'createMemberByUsername'), array($userName));
+                               $userInstance = call_user_func_array(array($this->getConfigInstance()->getConfigEntry('user_class'), 'createMemberByUsername'), array($userName));
 
                                // Remember this user instance in our registry for later usage
                                $registry->addInstance('user', $userInstance);
index ac76f56..43d7116 100644 (file)
@@ -57,7 +57,7 @@ class UserStatusVerifierFilter extends BaseFilter implements Filterable {
                $userInstance = Registry::getRegistry()->getInstance('user');
 
                // Is the user account confirmed?
-               if (($userInstance->getField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) != $this->getConfigInstance()->readConfig('user_status_confirmed')) && ($userInstance->getField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) != $this->getConfigInstance()->readConfig('user_status_guest'))) {
+               if (($userInstance->getField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) != $this->getConfigInstance()->getConfigEntry('user_status_confirmed')) && ($userInstance->getField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) != $this->getConfigInstance()->getConfigEntry('user_status_guest'))) {
                        // Request is invalid!
                        $requestInstance->requestIsValid(false);
 
index 35549fb..63347c6 100644 (file)
@@ -54,7 +54,7 @@ class UserUnconfirmedVerifierFilter extends BaseFilter implements Filterable {
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
                // Get member class
-               $userClass = $this->getConfigInstance()->readConfig('user_class');
+               $userClass = $this->getConfigInstance()->getConfigEntry('user_class');
 
                // Get a user instance for comparison
                $userInstance = call_user_func_array(array($userClass, 'createMemberByRequest'), array($requestInstance));
@@ -72,7 +72,7 @@ class UserUnconfirmedVerifierFilter extends BaseFilter implements Filterable {
                } // END - if
 
                // Is the user account confirmed?
-               if ($userInstance->getField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) != $this->getConfigInstance()->readConfig('user_status_unconfirmed')) {
+               if ($userInstance->getField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) != $this->getConfigInstance()->getConfigEntry('user_status_unconfirmed')) {
                        // Request is invalid!
                        $requestInstance->requestIsValid(false);
 
index 6fe5795..84cc009 100644 (file)
@@ -70,10 +70,10 @@ class GraphicalCodeCaptcha extends BaseCaptcha implements SolveableCaptcha {
         */
        public function initiateCaptcha () {
                // Get total length
-               $captchaLength = $this->getConfigInstance()->readConfig('captcha_string_length');
+               $captchaLength = $this->getConfigInstance()->getConfigEntry('captcha_string_length');
 
                // Get max string length
-               $strLength = $this->getConfigInstance()->readConfig('random_string_length');
+               $strLength = $this->getConfigInstance()->getConfigEntry('random_string_length');
 
                // Calculate starting position based on random place
                $start = $this->getRngInstance()->randomNumber(0, ($strLength - $captchaLength));
@@ -91,7 +91,7 @@ class GraphicalCodeCaptcha extends BaseCaptcha implements SolveableCaptcha {
                $captchaString = substr($base64String, $start, $captchaLength);
 
                // Get all characters we want to replace
-               $searchChars = $this->getConfigInstance()->readConfig('captcha_search_chars');
+               $searchChars = $this->getConfigInstance()->getConfigEntry('captcha_search_chars');
 
                // Get fixed salt and use it as "replacement characters"
                $replaceChars = $this->getRngInstance()->getExtraSalt();
index 64aafc7..23e99d9 100644 (file)
@@ -83,7 +83,7 @@ class WebBlockHelper extends BaseWebHelper implements HelpableTemplate {
         * @return      $withRegistration       Wether with registration date
         */
        public function ifIncludeRegistrationStamp () {
-               $withRegistration = ($this->getConfigInstance()->readConfig('block_shows_registration') == 'Y');
+               $withRegistration = ($this->getConfigInstance()->getConfigEntry('block_shows_registration') == 'Y');
                return $withRegistration;
        }
 
index d4aab6a..d9ba848 100644 (file)
@@ -40,7 +40,7 @@ class BaseWebHelper extends BaseHelper {
         * @return      $required       Wether the email address is required
         */
        public function ifRegisterRequiresEmailVerification () {
-               $required = ($this->getConfigInstance()->readConfig('register_requires_email') == 'Y');
+               $required = ($this->getConfigInstance()->getConfigEntry('register_requires_email') == 'Y');
                return $required;
        }
 
@@ -50,7 +50,7 @@ class BaseWebHelper extends BaseHelper {
         * @return      $required       Wether profile shall be asked
         */
        public function ifRegisterIncludesProfile () {
-               $required = ($this->getConfigInstance()->readConfig('register_includes_profile') == 'Y');
+               $required = ($this->getConfigInstance()->getConfigEntry('register_includes_profile') == 'Y');
                return $required;
        }
 
@@ -60,7 +60,7 @@ class BaseWebHelper extends BaseHelper {
         * @return      $required       Wether personal data shall be asked
         */
        public function ifRegisterIncludesPersonaData () {
-               $required = ($this->getConfigInstance()->readConfig('register_personal_data') == 'Y');
+               $required = ($this->getConfigInstance()->getConfigEntry('register_personal_data') == 'Y');
                return $required;
        }
 
@@ -70,7 +70,7 @@ class BaseWebHelper extends BaseHelper {
         * @return      $required       Wether birthday shall be asked
         */
        public function ifProfileIncludesBirthDay () {
-               $required = ($this->getConfigInstance()->readConfig('profile_includes_birthday') == 'Y');
+               $required = ($this->getConfigInstance()->getConfigEntry('profile_includes_birthday') == 'Y');
                return $required;
        }
 
@@ -80,7 +80,7 @@ class BaseWebHelper extends BaseHelper {
         * @return      $isUnique
         */
        public function ifEmailMustBeUnique () {
-               $isUnique = ($this->getConfigInstance()->readConfig('register_email_unique') == 'Y');
+               $isUnique = ($this->getConfigInstance()->getConfigEntry('register_email_unique') == 'Y');
                return $isUnique;
        }
 
@@ -90,7 +90,7 @@ class BaseWebHelper extends BaseHelper {
         * @return      $required       Wether the specified chat protocol is enabled
         */
        public function ifChatEnabled ($chatProtocol) {
-               $required = ($this->getConfigInstance()->readConfig('chat_enabled_' . $chatProtocol) == 'Y');
+               $required = ($this->getConfigInstance()->getConfigEntry('chat_enabled_' . $chatProtocol) == 'Y');
                return $required;
        }
 
@@ -100,7 +100,7 @@ class BaseWebHelper extends BaseHelper {
         * @return      $isEnabled      Wether the login is enabled or disabled
         */
        public function ifLoginIsEnabled () {
-               $isEnabled = ($this->getConfigInstance()->readConfig('login_enabled') == 'Y');
+               $isEnabled = ($this->getConfigInstance()->getConfigEntry('login_enabled') == 'Y');
                return $isEnabled;
        }
 
@@ -110,7 +110,7 @@ class BaseWebHelper extends BaseHelper {
         * @return      $isEnabled      Wether the login shall be done by username
         */
        public function ifLoginWithUsername () {
-               $isEnabled = ($this->getConfigInstance()->readConfig('login_type') == "username");
+               $isEnabled = ($this->getConfigInstance()->getConfigEntry('login_type') == "username");
                return $isEnabled;
        }
 
@@ -120,7 +120,7 @@ class BaseWebHelper extends BaseHelper {
         * @return      $isEnabled      Wether the login shall be done by email
         */
        public function ifLoginWithEmail () {
-               $isEnabled = ($this->getConfigInstance()->readConfig('login_type') == "email");
+               $isEnabled = ($this->getConfigInstance()->getConfigEntry('login_type') == "email");
                return $isEnabled;
        }
 
@@ -130,7 +130,7 @@ class BaseWebHelper extends BaseHelper {
         * @return      $isAllowed      Wether guest login is allowed
         */
        public function ifGuestLoginAllowed () {
-               $isAllowed = ($this->getConfigInstance()->readConfig('guest_login_allowed') == 'Y');
+               $isAllowed = ($this->getConfigInstance()->getConfigEntry('guest_login_allowed') == 'Y');
                return $isAllowed;
        }
 
@@ -140,7 +140,7 @@ class BaseWebHelper extends BaseHelper {
         * @return      $requireConfirm         Wether email change must be confirmed
         */
        public function ifEmailChangeRequireConfirmation () {
-               $requireConfirm = ($this->getConfigInstance()->readConfig('email_change_confirmation') == 'Y');
+               $requireConfirm = ($this->getConfigInstance()->getConfigEntry('email_change_confirmation') == 'Y');
                return $requireConfirm;
        }
 
@@ -160,7 +160,7 @@ class BaseWebHelper extends BaseHelper {
         * @return      $emailChange    Wether changing email address is allowed
         */
        public function ifEmailChangeAllowed () {
-               $emailChange = ($this->getConfigInstance()->readConfig('email_change_allowed') == 'Y');
+               $emailChange = ($this->getConfigInstance()->getConfigEntry('email_change_allowed') == 'Y');
                return $emailChange;
        }
 
@@ -170,7 +170,7 @@ class BaseWebHelper extends BaseHelper {
         * @return      $isUnconfirmed  Wether the user account is unconfirmed
         */
        public function ifUserAccountUnconfirmed () {
-               $isUnconfirmed = ($this->getValueField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) === $this->getConfigInstance()->readConfig('user_status_unconfirmed'));
+               $isUnconfirmed = ($this->getValueField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) === $this->getConfigInstance()->getConfigEntry('user_status_unconfirmed'));
                return $isUnconfirmed;
        }
 
@@ -180,7 +180,7 @@ class BaseWebHelper extends BaseHelper {
         * @return      $isUnconfirmed  Wether the user account is locked
         */
        public function ifUserAccountLocked () {
-               $isUnconfirmed = ($this->getValueField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) === $this->getConfigInstance()->readConfig('user_status_locked'));
+               $isUnconfirmed = ($this->getValueField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) === $this->getConfigInstance()->getConfigEntry('user_status_locked'));
                return $isUnconfirmed;
        }
 
@@ -190,7 +190,7 @@ class BaseWebHelper extends BaseHelper {
         * @return      $isUnconfirmed  Wether the user account is a guest
         */
        public function ifUserAccountGuest () {
-               $isUnconfirmed = ($this->getValueField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) === $this->getConfigInstance()->readConfig('user_status_guest'));
+               $isUnconfirmed = ($this->getValueField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) === $this->getConfigInstance()->getConfigEntry('user_status_guest'));
                return $isUnconfirmed;
        }
 
@@ -201,7 +201,7 @@ class BaseWebHelper extends BaseHelper {
         * @return      $refillActive   Wether the refill page is active
         */
        public function ifRefillPageActive () {
-               $refillActive = ($this->getConfigInstance()->readConfig('refill_page_active') == 'Y');
+               $refillActive = ($this->getConfigInstance()->getConfigEntry('refill_page_active') == 'Y');
                return $refillActive;
        }
 }
index 5542d3a..815db8d 100644 (file)
@@ -116,10 +116,10 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate {
                        // Add HTML code
                        $formContent = sprintf("<form name=\"%s\" class=\"forms\" action=\"%s/%s\" method=\"%s\" target=\"%s\"",
                                $formName,
-                               $this->getConfigInstance()->readConfig('base_url'),
-                               $this->getConfigInstance()->readConfig('form_action'),
-                               $this->getConfigInstance()->readConfig('form_method'),
-                               $this->getConfigInstance()->readConfig('form_target')
+                               $this->getConfigInstance()->getConfigEntry('base_url'),
+                               $this->getConfigInstance()->getConfigEntry('form_action'),
+                               $this->getConfigInstance()->getConfigEntry('form_method'),
+                               $this->getConfigInstance()->getConfigEntry('form_target')
                        );
 
                        // Add form id as well
@@ -272,7 +272,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate {
         */
        public function addInputHiddenConfiguredField ($fieldName, $prefix) {
                // Get the value from instance
-               $fieldValue = $this->getConfigInstance()->readConfig("{$prefix}_{$fieldName}");
+               $fieldValue = $this->getConfigInstance()->getConfigEntry("{$prefix}_{$fieldName}");
                //* DEBUG: */ echo __METHOD__.':'.$fieldName.'='.$fieldValue."<br />\n";
 
                // Add the text field
@@ -723,7 +723,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate {
         * @return      $required       Wether the email address is required
         */
        public function ifRegisterRequiresEmailVerification () {
-               $required = ($this->getConfigInstance()->readConfig('register_requires_email') == 'Y');
+               $required = ($this->getConfigInstance()->getConfigEntry('register_requires_email') == 'Y');
                return $required;
        }
 
@@ -733,7 +733,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate {
         * @return      $required       Wether profile data shall be asked
         */
        public function ifRegisterIncludesProfile () {
-               $required = ($this->getConfigInstance()->readConfig('register_includes_profile') == 'Y');
+               $required = ($this->getConfigInstance()->getConfigEntry('register_includes_profile') == 'Y');
                return $required;
        }
 
@@ -743,7 +743,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate {
         * @return      $isSecured      Wether this form is secured by a CAPTCHA
         */
        public function ifFormSecuredWithCaptcha () {
-               $isSecured = ($this->getConfigInstance()->readConfig($this->getFormName().'_captcha_secured') == 'Y');
+               $isSecured = ($this->getConfigInstance()->getConfigEntry($this->getFormName().'_captcha_secured') == 'Y');
                return $isSecured;
        }
 
index bbec50a..fa0d9a2 100644 (file)
@@ -104,7 +104,7 @@ class WebLinkHelper extends BaseWebHelper implements HelpableTemplate {
 
                // Determine link base from config now and 'page' request
                try {
-                       $newLinkBase = $helperInstance->getConfigInstance()->readConfig($configEntry);
+                       $newLinkBase = $helperInstance->getConfigInstance()->getConfigEntry($configEntry);
                        $linkBase = $newLinkBase;
                } catch (ConfigEntryNotFoundException $e) {
                        // Is the deprecated linkBase not set?
index fd082dd..30e9778 100644 (file)
@@ -95,7 +95,7 @@ class LanguageSystem extends BaseFrameworkSystem implements ManageableLanguage,
                $langInstance->initLanguageStrings();
 
                // Set language code from default config
-               $langInstance->setLanguageCode(FrameworkConfiguration::getInstance()->readConfig('default_lang'));
+               $langInstance->setLanguageCode(FrameworkConfiguration::getInstance()->getConfigEntry('default_lang'));
 
                // Remember this instance
                self::$thisInstance = $langInstance;
index efda821..08f66fc 100644 (file)
@@ -58,7 +58,7 @@ class BaseMailer extends BaseFrameworkSystem {
                $this->setTemplateName($templateName);
 
                // Get configuration entry
-               $templatePrefix = $this->getConfigInstance()->readConfig('email_tpl_' . $templateName);
+               $templatePrefix = $this->getConfigInstance()->getConfigEntry('email_tpl_' . $templateName);
 
                // Load this email template
                $this->getTemplateInstance()->loadEmailTemplate($templatePrefix . '_' . $templateName);
index a8b8155..599ec7f 100644 (file)
@@ -76,7 +76,7 @@ class ConsoleOutput extends BaseFrameworkSystem implements OutputStreamer {
         */
        public final static function getInstance() {
                if (is_null(self::$consoleInstance)) {
-                       $contentType = FrameworkConfiguration::getInstance()->readConfig('web_content_type');
+                       $contentType = FrameworkConfiguration::getInstance()->getConfigEntry('web_content_type');
                        self::$consoleInstance = ConsoleOutput::createConsoleOutput($contentType);
                }
                return self::$consoleInstance;
index 8da3eb9..1fb9532 100644 (file)
@@ -89,7 +89,7 @@ class UserPoints extends BaseFrameworkSystem implements Registerable, BookablePo
                $hasRequired = false;
 
                // Get the required points entry
-               $requiredPoints = $this->getConfigInstance()->readConfig($action . '_action_points');
+               $requiredPoints = $this->getConfigInstance()->getConfigEntry($action . '_action_points');
 
                // Now get a search criteria and set the user's name as criteria
                $searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
index e954686..662609a 100644 (file)
@@ -73,7 +73,7 @@ class ConsoleNewsReader extends BaseFrameworkSystem implements ReadableNews, Reg
                $criteriaInstance->addCriteria('page', $command);
 
                // Add limitation from config
-               $criteriaInstance->setLimit($this->getConfigInstance()->readConfig('news_' . $command . '_limit'));
+               $criteriaInstance->setLimit($this->getConfigInstance()->getConfigEntry('news_' . $command . '_limit'));
 
                // Get a resultInstance back from the database
                $resultInstance = $wrapperInstance->doSelectByCriteria($criteriaInstance);
index 0240b74..c15ee30 100644 (file)
@@ -73,7 +73,7 @@ class DefaultNewsReader extends BaseFrameworkSystem implements ReadableNews, Reg
                $criteriaInstance->addCriteria('page', $page);
 
                // Add limitation from config
-               $criteriaInstance->setLimit($this->getConfigInstance()->readConfig('news_' . $page . '_limit'));
+               $criteriaInstance->setLimit($this->getConfigInstance()->getConfigEntry('news_' . $page . '_limit'));
 
                // Get a resultInstance back from the database
                $resultInstance = $wrapperInstance->doSelectByCriteria($criteriaInstance);
index 4f963db..2118ba7 100644 (file)
@@ -89,7 +89,7 @@ class WebActionResolver extends BaseActionResolver implements ActionResolver {
                $actionName = $requestInstance->getRequestElement('action');
 
                // Is the action empty? Then fall back to default action
-               if (empty($actionName)) $actionName = $this->getConfigInstance()->readConfig('default_action');
+               if (empty($actionName)) $actionName = $this->getConfigInstance()->getConfigEntry('default_action');
 
                // Check if action is valid
                if ($this->isActionValid($actionName) === false) {
@@ -127,7 +127,7 @@ class WebActionResolver extends BaseActionResolver implements ActionResolver {
                $actionName = $this->getActionName();
 
                // Is the action empty? Then fall back to default action
-               if (empty($actionName)) $actionName = $this->getConfigInstance()->readConfig('default_action');
+               if (empty($actionName)) $actionName = $this->getConfigInstance()->getConfigEntry('default_action');
 
                // Check if action is valid
                if ($this->isActionValid($actionName) === false) {
index b3903d6..5eccb00 100644 (file)
@@ -89,7 +89,7 @@ class ConsoleCommandResolver extends BaseCommandResolver implements CommandResol
                $commandName = $requestInstance->getRequestElement('command');
 
                // Is the command empty? Then fall back to default command
-               if (empty($commandName)) $commandName = $this->getConfigInstance()->readConfig('default_console_command');
+               if (empty($commandName)) $commandName = $this->getConfigInstance()->getConfigEntry('default_console_command');
 
                // Check if command is valid
                if ($this->isCommandValid($commandName) === false) {
@@ -125,7 +125,7 @@ class ConsoleCommandResolver extends BaseCommandResolver implements CommandResol
                $commandInstance = null;
 
                // Is the command empty? Then fall back to default command
-               if (empty($commandName)) $commandName = $this->getConfigInstance()->readConfig('default_console_command');
+               if (empty($commandName)) $commandName = $this->getConfigInstance()->getConfigEntry('default_console_command');
 
                // Check if command is valid
                if ($this->isCommandValid($commandName) === false) {
index 9dca5ec..71c7a1b 100644 (file)
@@ -89,7 +89,7 @@ class ImageCommandResolver extends BaseCommandResolver implements CommandResolve
                $commandName = $requestInstance->getRequestElement('page');
 
                // Is the command empty? Then fall back to default command
-               if (empty($commandName)) $commandName = $this->getConfigInstance()->readConfig('default_image_command');
+               if (empty($commandName)) $commandName = $this->getConfigInstance()->getConfigEntry('default_image_command');
 
                // Check if command is valid
                if ($this->isCommandValid($commandName) === false) {
@@ -125,7 +125,7 @@ class ImageCommandResolver extends BaseCommandResolver implements CommandResolve
                $commandInstance = null;
 
                // Is the command empty? Then fall back to default command
-               if (empty($commandName)) $commandName = $this->getConfigInstance()->readConfig('default_image_command');
+               if (empty($commandName)) $commandName = $this->getConfigInstance()->getConfigEntry('default_image_command');
 
                // Check if command is valid
                if ($this->isCommandValid($commandName) === false) {
index cb23dd1..da0c35a 100644 (file)
@@ -89,7 +89,7 @@ class WebCommandResolver extends BaseCommandResolver implements CommandResolver
                $commandName = $requestInstance->getRequestElement('page');
 
                // Is the command empty? Then fall back to default command
-               if (empty($commandName)) $commandName = $this->getConfigInstance()->readConfig('default_web_command');
+               if (empty($commandName)) $commandName = $this->getConfigInstance()->getConfigEntry('default_web_command');
 
                // Check if command is valid
                if ($this->isCommandValid($commandName) === false) {
@@ -125,7 +125,7 @@ class WebCommandResolver extends BaseCommandResolver implements CommandResolver
                $commandInstance = null;
 
                // Is the command empty? Then fall back to default command
-               if (empty($commandName)) $commandName = $this->getConfigInstance()->readConfig('default_web_command');
+               if (empty($commandName)) $commandName = $this->getConfigInstance()->getConfigEntry('default_web_command');
 
                // Check if command is valid
                if ($this->isCommandValid($commandName) === false) {
index 85662f6..e3a5721 100644 (file)
@@ -94,7 +94,7 @@ class BaseControllerResolver extends BaseResolver {
         */
        protected function loadController ($controllerName) {
                // Cache default command
-               $defaultController = $this->getConfigInstance()->readConfig('default_' . strtolower($this->getControllerPrefix()) . '_command');
+               $defaultController = $this->getConfigInstance()->getConfigEntry('default_' . strtolower($this->getControllerPrefix()) . '_command');
 
                // Init controller instance
                $controllerInstance = null;
@@ -131,7 +131,7 @@ class BaseControllerResolver extends BaseResolver {
                        $resolverConfigEntry = sprintf("%s_cmd_%s_resolver_class", strtolower($this->getControllerPrefix()), strtolower($controllerName));
 
                        // Get the config, this will throw an exception if there is no special command resolver
-                       $resolverClass = $this->getConfigInstance()->readConfig($resolverConfigEntry);
+                       $resolverClass = $this->getConfigInstance()->getConfigEntry($resolverConfigEntry);
                } catch (ConfigEntryNotFoundException $e) {
                        // Use default resolver entry
                        // @TODO Maybe we need to log this?
index 694996b..c7990d7 100644 (file)
@@ -170,7 +170,7 @@ 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()->readConfig('header_charset')));
+                       //$this->addHeader('Content-type:', sprintf("text/html; charset=%s", $this->getConfigInstance()->getConfigEntry('header_charset')));
 
                        // Send all headers
                        foreach ($this->responseHeaders as $name => $value) {
index 8320e47..d7a7680 100644 (file)
@@ -118,7 +118,7 @@ class ConsoleResponse extends BaseResponse implements Responseable {
         * @return      $defaultCommand         Default command for this response
         */
        public function getDefaultCommand () {
-               $defaultCommand = $this->getConfigInstance()->readConfig('default_console_command');
+               $defaultCommand = $this->getConfigInstance()->getConfigEntry('default_console_command');
                return $defaultCommand;
        }
 
index 0bd0ff2..3d37fde 100644 (file)
@@ -97,11 +97,11 @@ class HttpResponse extends BaseResponse implements Responseable {
 
                // Get all config entries
                if (is_null($expires)) {
-                       $expires = (time() + $this->getConfigInstance()->readConfig('cookie_expire'));
+                       $expires = (time() + $this->getConfigInstance()->getConfigEntry('cookie_expire'));
                } // END - if
 
-               $path = $this->getConfigInstance()->readConfig('cookie_path');
-               $domain = $this->getConfigInstance()->readConfig('cookie_domain');
+               $path = $this->getConfigInstance()->getConfigEntry('cookie_path');
+               $domain = $this->getConfigInstance()->getConfigEntry('cookie_domain');
 
                setcookie($cookieName, $cookieValue, $expires);
                //, $path, $domain, (isset($_SERVER['HTTPS']))
@@ -135,7 +135,7 @@ class HttpResponse extends BaseResponse implements Responseable {
                $this->getTemplateInstance()->assignApplicationData($this->getApplicationInstance());
 
                // Get the url from config
-               $url = $this->getConfigInstance()->readConfig($configEntry . "_url");
+               $url = $this->getConfigInstance()->getConfigEntry($configEntry . "_url");
 
                // Compile the URL
                $url = $this->getTemplateInstance()->compileRawCode($url);
@@ -146,7 +146,7 @@ class HttpResponse extends BaseResponse implements Responseable {
                        if (substr($url, 0, 1) == '/') $url = substr($url, 1);
 
                        // No, then extend it with our base URL
-                       $url = $this->getConfigInstance()->readConfig('base_url') . '/' . $url;
+                       $url = $this->getConfigInstance()->getConfigEntry('base_url') . '/' . $url;
                } // END - if
 
                // Add redirect header
@@ -202,7 +202,7 @@ class HttpResponse extends BaseResponse implements Responseable {
         * @return      $defaultCommand         Default command for this response
         */
        public function getDefaultCommand () {
-               $defaultCommand = $this->getConfigInstance()->readConfig('default_web_command');
+               $defaultCommand = $this->getConfigInstance()->getConfigEntry('default_web_command');
                return $defaultCommand;
        }
 }
index 27fac28..28c67f5 100644 (file)
@@ -71,7 +71,7 @@ class ImageResponse extends BaseResponse implements Responseable {
                $cfg = $this->getConfigInstance();
 
                // Set new template engine
-               $cfg->setConfigEntry('template_class'         , $cfg->readConfig('image_template_class'));
+               $cfg->setConfigEntry('template_class'         , $cfg->getConfigEntry('image_template_class'));
                $cfg->setConfigEntry('raw_template_extension' , '.img');
                $cfg->setConfigEntry('code_template_extension', '.xml');
                $cfg->setConfigEntry('tpl_base_path'          , 'templates/images/');
@@ -111,11 +111,11 @@ class ImageResponse extends BaseResponse implements Responseable {
 
                // Get all config entries
                if (is_null($expires)) {
-                       $expires = (time() + $this->getConfigInstance()->readConfig('cookie_expire'));
+                       $expires = (time() + $this->getConfigInstance()->getConfigEntry('cookie_expire'));
                } // END - if
 
-               $path = $this->getConfigInstance()->readConfig('cookie_path');
-               $domain = $this->getConfigInstance()->readConfig('cookie_domain');
+               $path = $this->getConfigInstance()->getConfigEntry('cookie_path');
+               $domain = $this->getConfigInstance()->getConfigEntry('cookie_domain');
 
                setcookie($cookieName, $cookieValue, $expires);
                //, $path, $domain, (isset($_SERVER['HTTPS']))
@@ -149,7 +149,7 @@ class ImageResponse extends BaseResponse implements Responseable {
                $this->getTemplateInstance()->assignApplicationData($this->getApplicationInstance());
 
                // Get the url from config
-               $url = $this->getConfigInstance()->readConfig($configEntry . "_url");
+               $url = $this->getConfigInstance()->getConfigEntry($configEntry . "_url");
 
                // Compile the URL
                $url = $this->getTemplateInstance()->compileRawCode($url);
@@ -160,7 +160,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()->readConfig('base_url') . '/' . $url;
+                       $url = $this->getConfigInstance()->getConfigEntry('base_url') . '/' . $url;
                } // END - if
 
                // Add redirect header
@@ -259,7 +259,7 @@ class ImageResponse extends BaseResponse implements Responseable {
         * @return      $defaultCommand         Default command for this response
         */
        public function getDefaultCommand () {
-               $defaultCommand = $this->getConfigInstance()->readConfig('default_image_command');
+               $defaultCommand = $this->getConfigInstance()->getConfigEntry('default_image_command');
                return $defaultCommand;
        }
 }
index 3469b61..53ef6e7 100644 (file)
@@ -88,7 +88,7 @@ class RandomNumberGenerator extends BaseFrameworkSystem {
         */
        protected function initRng ($extraInstance) {
                // Get the prime number from config
-               $this->prime = $this->getConfigInstance()->readConfig('math_prime');
+               $this->prime = $this->getConfigInstance()->getConfigEntry('math_prime');
 
                // Calculate the extra number which is always the same unless you give
                // a better prime number
@@ -101,7 +101,7 @@ class RandomNumberGenerator extends BaseFrameworkSystem {
                $serverIp = "cluster";
 
                // Do we have a single server?
-               if ($this->getConfigInstance()->readConfig('is_single_server') == 'Y') {
+               if ($this->getConfigInstance()->getConfigEntry('is_single_server') == 'Y') {
                        // Then use that IP for extra security
                        $serverIp = getenv('SERVER_ADDR');
                } // END - if
@@ -116,10 +116,10 @@ class RandomNumberGenerator extends BaseFrameworkSystem {
                }
 
                // One-way data we need for "extra-salting" the random number
-               $this->extraSalt = sha1($this->fixedSalt . ':' . getenv('SERVER_SOFTWARE') . ':' . $this->getConfigInstance()->readConfig('date_key') . $this->getConfigInstance()->readConfig('base_url'));
+               $this->extraSalt = sha1($this->fixedSalt . ':' . getenv('SERVER_SOFTWARE') . ':' . $this->getConfigInstance()->getConfigEntry('date_key') . $this->getConfigInstance()->getConfigEntry('base_url'));
 
                // Get config entry for max salt length
-               $this->rndStrLen = $this->getConfigInstance()->readConfig('rnd_str_length');
+               $this->rndStrLen = $this->getConfigInstance()->getConfigEntry('rnd_str_length');
        }
 
        /**
index d6b3a15..5a45bd7 100644 (file)
@@ -541,7 +541,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
 
                // Construct the FQFN for the template by honoring the current language
                $fqfn = sprintf("%s%s%s%s/%s/%s%s",
-                       $this->getConfigInstance()->readConfig('base_path'),
+                       $this->getConfigInstance()->getConfigEntry('base_path'),
                        $this->getTemplateBasePath(),
                        $this->getGenericBasePath(),
                        $this->getLanguageInstance()->getLanguageCode(),
@@ -556,7 +556,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                        $this->loadRawTemplateData($fqfn);
                } catch (FileNotFoundException $e) {
                        // If we shall load a code-template we need to switch the file extension
-                       if (($this->getTemplateType() != $this->getConfigInstance()->readConfig('web_template_type')) && (empty($extOther))) {
+                       if (($this->getTemplateType() != $this->getConfigInstance()->getConfigEntry('web_template_type')) && (empty($extOther))) {
                                // Switch over to the code-template extension and try it again
                                $ext = $this->getCodeTemplateExtension();
 
@@ -930,7 +930,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
         */
        public function loadWebTemplate ($template) {
                // Set template type
-               $this->setTemplateType($this->getConfigInstance()->readConfig('web_template_type'));
+               $this->setTemplateType($this->getConfigInstance()->getConfigEntry('web_template_type'));
 
                // Load the special template
                $this->loadTemplate($template);
@@ -945,7 +945,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
        public function assignConfigVariable ($var) {
                // Sweet and simple...
                //* DEBUG: */ echo __METHOD__.':var={$var}<br />\n';
-               $this->varStack['config'][$var] = $this->getConfigInstance()->readConfig($var);
+               $this->varStack['config'][$var] = $this->getConfigInstance()->getConfigEntry($var);
        }
 
        /**
@@ -957,7 +957,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
         */
        public function loadEmailTemplate ($template) {
                // Set template type
-               $this->setTemplateType($this->getConfigInstance()->readConfig('email_template_type'));
+               $this->setTemplateType($this->getConfigInstance()->getConfigEntry('email_template_type'));
 
                // Load the special template
                $this->loadTemplate($template);
@@ -972,7 +972,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
         */
        public function loadCodeTemplate ($template) {
                // Set template type
-               $this->setTemplateType($this->getConfigInstance()->readConfig('code_template_type'));
+               $this->setTemplateType($this->getConfigInstance()->getConfigEntry('code_template_type'));
 
                // Load the special template
                $this->loadTemplate($template);
@@ -986,7 +986,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
         */
        public final function compileVariables () {
                // Initialize the $content array
-               $validVar = $this->getConfigInstance()->readConfig('tpl_valid_var');
+               $validVar = $this->getConfigInstance()->getConfigEntry('tpl_valid_var');
                $dummy = array();
 
                // Iterate through all general variables
@@ -1084,9 +1084,9 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
         */
        public function compileTemplate () {
                // We will only work with template type "code" from configuration
-               if ($this->getTemplateType() != $this->getConfigInstance()->readConfig('code_template_type')) {
+               if ($this->getTemplateType() != $this->getConfigInstance()->getConfigEntry('code_template_type')) {
                        // Abort here
-                       throw new UnexpectedTemplateTypeException(array($this, $this->getTemplateType(), $this->getConfigInstance()->readConfig('code_template_type')), self::EXCEPTION_TEMPLATE_TYPE_IS_UNEXPECTED);
+                       throw new UnexpectedTemplateTypeException(array($this, $this->getTemplateType(), $this->getConfigInstance()->getConfigEntry('code_template_type')), self::EXCEPTION_TEMPLATE_TYPE_IS_UNEXPECTED);
                } // END - if
 
                // Get the raw data.
index fd321ab..eb536f8 100644 (file)
@@ -92,7 +92,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
                $ioInstance = $appInstance->getFileIoInstance();
 
                // Determine base path
-               $templateBasePath = $tplInstance->getConfigInstance()->readConfig('application_base_path') . $appInstance->getRequestInstance()->getRequestElement('app') . '/';
+               $templateBasePath = $tplInstance->getConfigInstance()->getConfigEntry('application_base_path') . $appInstance->getRequestInstance()->getRequestElement('app') . '/';
 
                // Is the base path valid?
                if (empty($templateBasePath)) {
@@ -120,11 +120,11 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
                $tplInstance->setFileIoInstance($ioInstance);
 
                // Set template extensions
-               $tplInstance->setRawTemplateExtension($configInstance->readConfig('raw_template_extension'));
-               $tplInstance->setCodeTemplateExtension($configInstance->readConfig('code_template_extension'));
+               $tplInstance->setRawTemplateExtension($configInstance->getConfigEntry('raw_template_extension'));
+               $tplInstance->setCodeTemplateExtension($configInstance->getConfigEntry('code_template_extension'));
 
                // Absolute output path for compiled templates
-               $tplInstance->setCompileOutputPath($configInstance->readConfig('base_path') . $configInstance->readConfig('compile_output_path'));
+               $tplInstance->setCompileOutputPath($configInstance->getConfigEntry('base_path') . $configInstance->getConfigEntry('compile_output_path'));
 
                // Return the prepared instance
                return $tplInstance;
@@ -475,7 +475,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
        public function getImageCacheFqfn () {
                // Get the FQFN ready
                $fqfn = sprintf("%s%s%s/%s.%s",
-                       $this->getConfigInstance()->readConfig('base_path'),
+                       $this->getConfigInstance()->getConfigEntry('base_path'),
                        $this->getGenericBasePath(),
                        'images/_cache',
                        md5(
@@ -508,7 +508,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
         */
        public function loadImageTemplate ($template) {
                // Set template type
-               $this->setTemplateType($this->getConfigInstance()->readConfig('image_template_type'));
+               $this->setTemplateType($this->getConfigInstance()->getConfigEntry('image_template_type'));
 
                // Load the special template
                $this->loadTemplate($template);
index bad30ac..2f69fab 100644 (file)
@@ -78,7 +78,7 @@ class MailTemplateEngine extends BaseTemplateEngine implements CompileableTempla
                $ioInstance = $appInstance->getFileIoInstance();
 
                // Determine base path
-               $templateBasePath = $tplInstance->getConfigInstance()->readConfig('application_base_path') . $appInstance->getRequestInstance()->getRequestElement('app') . '/';
+               $templateBasePath = $tplInstance->getConfigInstance()->getConfigEntry('application_base_path') . $appInstance->getRequestInstance()->getRequestElement('app') . '/';
 
                // Is the base path valid?
                if (empty($templateBasePath)) {
@@ -106,11 +106,11 @@ class MailTemplateEngine extends BaseTemplateEngine implements CompileableTempla
                $tplInstance->setFileIoInstance($ioInstance);
 
                // Set template extensions
-               $tplInstance->setRawTemplateExtension($configInstance->readConfig('raw_template_extension'));
-               $tplInstance->setCodeTemplateExtension($configInstance->readConfig('code_template_extension'));
+               $tplInstance->setRawTemplateExtension($configInstance->getConfigEntry('raw_template_extension'));
+               $tplInstance->setCodeTemplateExtension($configInstance->getConfigEntry('code_template_extension'));
 
                // Absolute output path for compiled templates
-               $tplInstance->setCompileOutputPath($configInstance->readConfig('base_path') . $configInstance->readConfig('compile_output_path'));
+               $tplInstance->setCompileOutputPath($configInstance->getConfigEntry('base_path') . $configInstance->getConfigEntry('compile_output_path'));
 
                // Return the prepared instance
                return $tplInstance;
index 8c5cee4..2d38712 100644 (file)
@@ -53,7 +53,7 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
                $ioInstance = $appInstance->getFileIoInstance();
 
                // Determine base path
-               $templateBasePath = $tplInstance->getConfigInstance()->readConfig('application_base_path') . $appInstance->getRequestInstance()->getRequestElement('app') . '/';
+               $templateBasePath = $tplInstance->getConfigInstance()->getConfigEntry('application_base_path') . $appInstance->getRequestInstance()->getRequestElement('app') . '/';
 
                // Is the base path valid?
                if (empty($templateBasePath)) {
@@ -81,11 +81,11 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
                $tplInstance->setFileIoInstance($ioInstance);
 
                // Set template extensions
-               $tplInstance->setRawTemplateExtension($configInstance->readConfig('raw_template_extension'));
-               $tplInstance->setCodeTemplateExtension($configInstance->readConfig('menu_template_extension'));
+               $tplInstance->setRawTemplateExtension($configInstance->getConfigEntry('raw_template_extension'));
+               $tplInstance->setCodeTemplateExtension($configInstance->getConfigEntry('menu_template_extension'));
 
                // Absolute output path for compiled templates
-               $tplInstance->setCompileOutputPath($configInstance->readConfig('base_path') . $configInstance->readConfig('compile_output_path'));
+               $tplInstance->setCompileOutputPath($configInstance->getConfigEntry('base_path') . $configInstance->getConfigEntry('compile_output_path'));
 
                // Return the prepared instance
                return $tplInstance;
index bc7eb79..aee5afa 100644 (file)
@@ -54,7 +54,7 @@ class WebTemplateEngine extends BaseTemplateEngine implements CompileableTemplat
                $ioInstance = $appInstance->getFileIoInstance();
 
                // Determine base path
-               $templateBasePath = $tplInstance->getConfigInstance()->readConfig('application_base_path') . $appInstance->getRequestInstance()->getRequestElement('app') . '/';
+               $templateBasePath = $tplInstance->getConfigInstance()->getConfigEntry('application_base_path') . $appInstance->getRequestInstance()->getRequestElement('app') . '/';
 
                // Is the base path valid?
                if (empty($templateBasePath)) {
@@ -82,11 +82,11 @@ class WebTemplateEngine extends BaseTemplateEngine implements CompileableTemplat
                $tplInstance->setFileIoInstance($ioInstance);
 
                // Set template extensions
-               $tplInstance->setRawTemplateExtension($configInstance->readConfig('raw_template_extension'));
-               $tplInstance->setCodeTemplateExtension($configInstance->readConfig('code_template_extension'));
+               $tplInstance->setRawTemplateExtension($configInstance->getConfigEntry('raw_template_extension'));
+               $tplInstance->setCodeTemplateExtension($configInstance->getConfigEntry('code_template_extension'));
 
                // Absolute output path for compiled templates
-               $tplInstance->setCompileOutputPath($configInstance->readConfig('base_path') . $configInstance->readConfig('compile_output_path'));
+               $tplInstance->setCompileOutputPath($configInstance->getConfigEntry('base_path') . $configInstance->getConfigEntry('compile_output_path'));
 
                // Return the prepared instance
                return $tplInstance;
index 9fc5883..907a495 100644 (file)
@@ -117,7 +117,7 @@ class Member extends BaseUser implements ManageableMember, Registerable {
 
                // If there is no action use the default on
                if (is_null($lastAction)) {
-                       $lastAction = $this->getConfigInstance()->readConfig('login_default_action');
+                       $lastAction = $this->getConfigInstance()->getConfigEntry('login_default_action');
                } // END - if
 
                // Get a critieria instance
index 1e0c07c..1226b15 100644 (file)
@@ -42,7 +42,7 @@ $cfg->setConfigEntry('base_url', $cfg->detectBaseUrl());
 $cfg->setConfigEntry('db_type', 'local');
 
 // CFG: LOCAL-DB-PATH
-$cfg->setConfigEntry('local_db_path', $cfg->readConfig('base_path') . 'db/');
+$cfg->setConfigEntry('local_db_path', $cfg->getConfigEntry('base_path') . 'db/');
 
 // CFG: TIME-ZONE
 $cfg->setDefaultTimezone('Europe/Berlin');
@@ -84,7 +84,7 @@ $cfg->setConfigEntry('compressor_base_path', 'inc/classes/main/compressor/');
 $cfg->setConfigEntry('application_base_path', 'application/');
 
 // CFG: APPLICATION-PATH
-$cfg->setConfigEntry('application_path', $cfg->readConfig('base_path') . $cfg->readConfig('application_base_path'));
+$cfg->setConfigEntry('application_path', $cfg->getConfigEntry('base_path') . $cfg->getConfigEntry('application_base_path'));
 
 // CFG: COMPILE-OUTPUT-PATH
 $cfg->setConfigEntry('compile_output_path', 'templates/_compiled/');
index 85da303..12d7044 100644 (file)
@@ -111,7 +111,7 @@ class FrameworkConfiguration implements Registerable {
                                        // Base path added? (Uni* / Windows)
                                        if ((substr($inc, 0, 1) != '/') && (substr($inc, 1, 1) != ':')) {
                                                // Generate FQFN
-                                               $fqfn = $this->readConfig('base_path') . '/inc/extra/' . $inc;
+                                               $fqfn = $this->getConfigEntry('base_path') . '/inc/extra/' . $inc;
                                        } // END - if
                                } // END - if
 
@@ -130,7 +130,7 @@ class FrameworkConfiguration implements Registerable {
         * @throws      ConfigEntryNotFoundException    If a configuration element
         *                                                                                      was not found
         */
-       public function readConfig ($cfgEntry) {
+       public function getConfigEntry ($cfgEntry) {
                // Cast to string
                $cfgEntry = (string) $cfgEntry;
 
index f2b5632..40d58f0 100644 (file)
@@ -26,7 +26,7 @@
 $databaseInstance = null;
 
 // Generate FQFN for the database layer
-$fqfn = FrameworkConfiguration::getInstance()->readConfig('base_path') . 'inc/database/lib-' . FrameworkConfiguration::getInstance()->readConfig('db_type') . '.php';
+$fqfn = FrameworkConfiguration::getInstance()->getConfigEntry('base_path') . 'inc/database/lib-' . FrameworkConfiguration::getInstance()->getConfigEntry('db_type') . '.php';
 
 // Load the database layer include
 if ((file_exists($fqfn)) && (is_file($fqfn)) && (is_readable($fqfn))) {
@@ -35,7 +35,7 @@ if ((file_exists($fqfn)) && (is_file($fqfn)) && (is_readable($fqfn))) {
 } else {
        // Layer is missing!
        ApplicationEntryPoint::app_die(sprintf("[Main:] Database layer is missing! (%s) -&gt; R.I.P.",
-               FrameworkConfiguration::getInstance()->readConfig('db_type')
+               FrameworkConfiguration::getInstance()->getConfigEntry('db_type')
        ));
 }
 
index 6d47355..218f929 100644 (file)
@@ -24,7 +24,7 @@
 
 // For testing purposes we use a local file database
 $databaseInstance = LocalFileDatabase::createLocalFileDatabase(
-       FrameworkConfiguration::getInstance()->readConfig('local_db_path'),
+       FrameworkConfiguration::getInstance()->getConfigEntry('local_db_path'),
        FileIoHandler::getInstance()
 );
 
index 107fbed..29572e1 100644 (file)
  */
 
 // Include the class loader function
-require(FrameworkConfiguration::getInstance()->readConfig('base_path') . 'inc/loader/class_ClassLoader.php');
+require(FrameworkConfiguration::getInstance()->getConfigEntry('base_path') . 'inc/loader/class_ClassLoader.php');
 
 // Shall we include additional configs where you can configure some things? Then
 // Load matching config
 ClassLoader::getInstance()->loadExtraConfigs();
 
 // Register hooks here
-require(FrameworkConfiguration::getInstance()->readConfig('base_path') . 'inc/hooks.php');
+require(FrameworkConfiguration::getInstance()->getConfigEntry('base_path') . 'inc/hooks.php');
 
 // Does the user has an application specified?
 if (!empty($_GET['app'])) {
@@ -45,11 +45,11 @@ if (!empty($_GET['app'])) {
                $application = trim($app[1]);
        } else {
                // Invalid entry found, first must be "app"!
-               $application = FrameworkConfiguration::getInstance()->readConfig('default_application');
+               $application = FrameworkConfiguration::getInstance()->getConfigEntry('default_application');
        }
 } else {
        // Set the "application selector" application
-       $application = FrameworkConfiguration::getInstance()->readConfig('default_application');
+       $application = FrameworkConfiguration::getInstance()->getConfigEntry('default_application');
 }
 
 // Secure it, by keeping out tags
@@ -62,7 +62,7 @@ $application = preg_replace('/([^a-z0-9_-])+/i', '', $application);
 FrameworkConfiguration::getInstance()->setConfigEntry('app_name', $application);
 
 // Is the devel package included?
-if (is_dir(FrameworkConfiguration::getInstance()->readConfig('base_path') . 'devel')) {
+if (is_dir(FrameworkConfiguration::getInstance()->getConfigEntry('base_path') . 'devel')) {
        // Load all development includes
        ClassLoader::getInstance()->scanClassPath('devel');
 } // END - if
index 627baab..38ae358 100644 (file)
@@ -23,8 +23,8 @@
 
 // Try to instance the language system
 $lang = LanguageSystem::createLanguageSystem(
-       FrameworkConfiguration::getInstance()->readConfig('base_path').
-       FrameworkConfiguration::getInstance()->readConfig('lang_base_path')
+       FrameworkConfiguration::getInstance()->getConfigEntry('base_path').
+       FrameworkConfiguration::getInstance()->getConfigEntry('lang_base_path')
 );
 
 // Is the app variable there and valid?
index b609487..97a477e 100644 (file)
@@ -135,13 +135,13 @@ class ClassLoader {
 
                // Construct the FQFN for the cache
                if (!defined('DEVELOPER')) {
-                       $this->listCacheFQFN  = $this->configInstance->readConfig('local_db_path') . "list-" . $this->configInstance->readConfig('app_name') . ".cache";
-                       $this->classCacheFQFN = $this->configInstance->readConfig('local_db_path') . "class-" . $this->configInstance->readConfig('app_name') . ".cache";
+                       $this->listCacheFQFN  = $this->configInstance->getConfigEntry('local_db_path') . "list-" . $this->configInstance->getConfigEntry('app_name') . ".cache";
+                       $this->classCacheFQFN = $this->configInstance->getConfigEntry('local_db_path') . "class-" . $this->configInstance->getConfigEntry('app_name') . ".cache";
                } // END - if
 
                // Set suffix and prefix from configuration
-               $this->suffix = $configInstance->readConfig('class_suffix');
-               $this->prefix = $configInstance->readConfig('class_prefix');
+               $this->suffix = $configInstance->getConfigEntry('class_suffix');
+               $this->prefix = $configInstance->getConfigEntry('class_prefix');
 
                // Set own instance
                self::$selfInstance = $this;
@@ -315,7 +315,7 @@ class ClassLoader {
                $this->prefix = 'config-';
 
                // Set base directory
-               $basePath = $this->configInstance->readConfig('base_path') . 'inc/config/';
+               $basePath = $this->configInstance->getConfigEntry('base_path') . 'inc/config/';
 
                // Load all classes from the config directory
                $this->scanClassPath($basePath);
index 603fae7..5216da1 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 // Get a debugger instance
-$debug = DebugMiddleware::createDebugMiddleware(FrameworkConfiguration::getInstance()->readConfig('debug_class'));
+$debug = DebugMiddleware::createDebugMiddleware(FrameworkConfiguration::getInstance()->getConfigEntry('debug_class'));
 
 // Empty string should be ignored and used for testing the middleware
 DebugMiddleware::getInstance()->output('');
index 05b2379..a441daf 100644 (file)
@@ -24,7 +24,7 @@
 
 // Try to load these includes in the given order
 $configAppIncludes = array(
-       'class_' . FrameworkConfiguration::getInstance()->readConfig('app_helper_class'), // The ApplicationHelper class
+       'class_' . FrameworkConfiguration::getInstance()->getConfigEntry('app_helper_class'), // The ApplicationHelper class
        'config',               // The application's own configuration
        'data',                 // Application data
        'init',                 // The application initializer
@@ -35,12 +35,12 @@ $configAppIncludes = array(
 );
 
 // Cache base path/file here
-$basePathFile = FrameworkConfiguration::getInstance()->readConfig('application_path') . FrameworkConfiguration::getInstance()->readConfig('app_name');
+$basePathFile = FrameworkConfiguration::getInstance()->getConfigEntry('application_path') . FrameworkConfiguration::getInstance()->getConfigEntry('app_name');
 
 // Is the directory there?
 if (!is_dir($basePathFile)) {
        // Not found.
-       trigger_error('Application ' . FrameworkConfiguration::getInstance()->readConfig('app_name') . ' not found.');
+       trigger_error('Application ' . FrameworkConfiguration::getInstance()->getConfigEntry('app_name') . ' not found.');
 } // END - if
 
 // Load them all (try only)
@@ -60,7 +60,7 @@ foreach ($configAppIncludes as $appInc) {
                //* DEBUG: */ print basename(__FILE__)."[".__LINE__."]: Loading ".basename($appFqFn)." - START\n";
                require($appFqFn);
                //* DEBUG: */ print basename(__FILE__)."[".__LINE__."]: Loading ".basename($appFqFn)." - END\n";
-       } elseif (FrameworkConfiguration::getInstance()->readConfig('verbose_level') > 0) {
+       } elseif (FrameworkConfiguration::getInstance()->getConfigEntry('verbose_level') > 0) {
                // File is missing
                trigger_error(sprintf("Cannot load application script %s.php! File is missing or read-protected.",
                        $appInc
index 888bbdf..30d45ff 100644 (file)
@@ -8,10 +8,10 @@ print (basename(__FILE__).": Init...\n");
 require(dirname(dirname(__FILE__)) . '/inc/config.php');
 
 // Load all include files
-require($cfg->readConfig('base_path') . 'inc/includes.php');
+require($cfg->getConfigEntry('base_path') . 'inc/includes.php');
 
 // Load all game classes
-require($cfg->readConfig('base_path') . 'inc/classes.php');
+require($cfg->getConfigEntry('base_path') . 'inc/classes.php');
 
 // Set default application
 FrameworkConfiguration::getInstance()->setConfigEntry('default_application', 'ship-simu');
@@ -59,7 +59,7 @@ class ConfigTest extends PHPUnit_Framework_TestCase {
                $testPassed = false;
                try {
                        // Now find a configuration variable that does not exist
-                       $dummy = FrameworkConfiguration::getInstance()->readConfig('does_not_exist');
+                       $dummy = FrameworkConfiguration::getInstance()->getConfigEntry('does_not_exist');
                } catch (ConfigEntryNotFoundException $expected) {
                        // This exception was expected, so it is fine
                        $testPassed = true;
@@ -85,7 +85,7 @@ class ConfigTest extends PHPUnit_Framework_TestCase {
                $testPassed = false;
                try {
                        // Try to read an empty configuration variable
-                       $dummy = FrameworkConfiguration::getInstance()->readConfig('');
+                       $dummy = FrameworkConfiguration::getInstance()->getConfigEntry('');
                } catch (ConfigEntryIsEmptyException $expected) {
                        // This exception was expected, so it is fine
                        $testPassed = true;
@@ -131,7 +131,7 @@ class ConfigTest extends PHPUnit_Framework_TestCase {
         *
         * @return      void
         */
-       public function testWriteReadConfigEntry () {
+       public function testWritegetConfigEntryEntry () {
                // Try it here
                $value = "This is a test value";
                try {
@@ -139,7 +139,7 @@ class ConfigTest extends PHPUnit_Framework_TestCase {
                        FrameworkConfiguration::getInstance()->setConfigEntry('test_key', "{$value}");
 
                        // Read the config entry we have just written
-                       $readValue = FrameworkConfiguration::getInstance()->readConfig('test_key');
+                       $readValue = FrameworkConfiguration::getInstance()->getConfigEntry('test_key');
 
                        // Now test the values
                        $this->assertEquals($value, $readValue);
index 93cafa9..78fc196 100644 (file)
@@ -8,10 +8,10 @@ print (basename(__FILE__).": Init...\n");
 require(dirname(dirname(__FILE__)) . '/inc/config.php');
 
 // Load all include files
-require($cfg->readConfig('base_path') . 'inc/includes.php');
+require($cfg->getConfigEntry('base_path') . 'inc/includes.php');
 
 // Load all game classes
-require($cfg->readConfig('base_path') . 'inc/classes.php');
+require($cfg->getConfigEntry('base_path') . 'inc/classes.php');
 
 // Set default application
 FrameworkConfiguration::getInstance()->setConfigEntry('default_application', 'ship-simu');
index 5c1cc76..6312351 100644 (file)
@@ -8,10 +8,10 @@ print (basename(__FILE__).": Init...\n");
 require(dirname(dirname(__FILE__)) . '/inc/config.php');
 
 // Load all include files
-require($cfg->readConfig('base_path') . 'inc/includes.php');
+require($cfg->getConfigEntry('base_path') . 'inc/includes.php');
 
 // Load all game classes
-require($cfg->readConfig('base_path') . 'inc/classes.php');
+require($cfg->getConfigEntry('base_path') . 'inc/classes.php');
 
 // Set default application
 FrameworkConfiguration::getInstance()->setConfigEntry('default_application', 'ship-simu');
index 7dba790..400f417 100644 (file)
@@ -8,10 +8,10 @@ print (basename(__FILE__).": Init...\n");
 require(dirname(dirname(__FILE__)) . '/inc/config.php');
 
 // Load all include files
-require($cfg->readConfig('base_path') . 'inc/includes.php');
+require($cfg->getConfigEntry('base_path') . 'inc/includes.php');
 
 // Load all game classes
-require($cfg->readConfig('base_path') . 'inc/classes.php');
+require($cfg->getConfigEntry('base_path') . 'inc/classes.php');
 
 // Set default application
 FrameworkConfiguration::getInstance()->setConfigEntry('default_application', 'ship-simu');
index ccf6fdb..f29180e 100644 (file)
@@ -9,23 +9,23 @@ define('TEST_MODE', true);
 require(dirname(dirname(dirname(__FILE__))) . '/inc/config.php');
 
 // Load all include files
-require($cfg->readConfig('base_path') . 'inc/includes.php');
+require($cfg->getConfigEntry('base_path') . 'inc/includes.php');
 
 // Load all game classes
-require($cfg->readConfig('base_path') . 'inc/classes.php');
+require($cfg->getConfigEntry('base_path') . 'inc/classes.php');
 
 // Load file I/O handler
-require($cfg->readConfig('base_path') . 'inc/file_io.php');
+require($cfg->getConfigEntry('base_path') . 'inc/file_io.php');
 
 // Load database layer
-require($cfg->readConfig('base_path') . 'inc/database.php');
+require($cfg->getConfigEntry('base_path') . 'inc/database.php');
 
 // Set default application
 FrameworkConfiguration::getInstance()->setConfigEntry('default_application', 'ship-simu');
 $application = 'ship-simu';
 
 // Load more includes
-require($cfg->readConfig('base_path') . 'application/ship-simu/loader.php');
+require($cfg->getConfigEntry('base_path') . 'application/ship-simu/loader.php');
 
 // Wir tun hier so, als waere schon das Reederei-Objekt generiert und wir wollen
 // jetzt die Personalliste wiederherstellen
index d8e00c6..7553ba2 100644 (file)
@@ -9,23 +9,23 @@ define('TEST_MODE', true);
 require(dirname(dirname(dirname(__FILE__))) . '/inc/config.php');
 
 // Load all include files
-require($cfg->readConfig('base_path') . 'inc/includes.php');
+require($cfg->getConfigEntry('base_path') . 'inc/includes.php');
 
 // Load all game classes
-require($cfg->readConfig('base_path') . 'inc/classes.php');
+require($cfg->getConfigEntry('base_path') . 'inc/classes.php');
 
 // Load file I/O handler
-require($cfg->readConfig('base_path') . 'inc/file_io.php');
+require($cfg->getConfigEntry('base_path') . 'inc/file_io.php');
 
 // Load database layer
-require($cfg->readConfig('base_path') . 'inc/database.php');
+require($cfg->getConfigEntry('base_path') . 'inc/database.php');
 
 // Set default application
 FrameworkConfiguration::getInstance()->setConfigEntry('default_application', 'ship-simu');
 $application = 'ship-simu';
 
 // Load more includes
-require($cfg->readConfig('base_path') . 'application/ship-simu/loader.php');
+require($cfg->getConfigEntry('base_path') . 'application/ship-simu/loader.php');
 
 // Wir tun hier so, als waere schon das Reederei-Objekt generiert und wir wollen
 // jetzt die Personalliste wiederherstellen
index c09ae48..2399ed4 100644 (file)
@@ -9,23 +9,23 @@ define('TEST_MODE', true);
 require(dirname(dirname(dirname(__FILE__))) . '/inc/config.php');
 
 // Load all include files
-require($cfg->readConfig('base_path') . 'inc/includes.php');
+require($cfg->getConfigEntry('base_path') . 'inc/includes.php');
 
 // Load all game classes
-require($cfg->readConfig('base_path') . 'inc/classes.php');
+require($cfg->getConfigEntry('base_path') . 'inc/classes.php');
 
 // Load file I/O handler
-require($cfg->readConfig('base_path') . 'inc/file_io.php');
+require($cfg->getConfigEntry('base_path') . 'inc/file_io.php');
 
 // Load database layer
-require($cfg->readConfig('base_path') . 'inc/database.php');
+require($cfg->getConfigEntry('base_path') . 'inc/database.php');
 
 // Set default application
 FrameworkConfiguration::getInstance()->setConfigEntry('default_application', 'ship-simu');
 $application = 'ship-simu';
 
 // Load more includes
-require($cfg->readConfig('base_path') . 'application/ship-simu/loader.php');
+require($cfg->getConfigEntry('base_path') . 'application/ship-simu/loader.php');
 
 // Wir tun hier so, als waere schon das Reederei-Objekt generiert und wir wollen
 // jetzt die Personalliste wiederherstellen