From: Roland Häder Date: Tue, 28 Jul 2009 17:15:55 +0000 (+0000) Subject: readConfig() is not naming convention, renamed to getConfigEntry() X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f2be98b408a52bd13ea85bdc93f2cf79ba8ec4fe;p=admin.git readConfig() is not naming convention, renamed to getConfigEntry() --- diff --git a/application/admin/data.php b/application/admin/data.php index d2e8904..b06d505 100644 --- a/application/admin/data.php +++ b/application/admin/data.php @@ -38,7 +38,7 @@ $cfg = FrameworkConfiguration::getInstance(); // Get an instance of the helper $app = call_user_func_array( - array($cfg->readConfig('app_helper_class'), 'getInstance'), + array($cfg->getConfigEntry('app_helper_class'), 'getInstance'), array() ); diff --git a/application/admin/init.php b/application/admin/init.php index 0204484..d77dcc6 100644 --- a/application/admin/init.php +++ b/application/admin/init.php @@ -37,17 +37,17 @@ $cfg = FrameworkConfiguration::getInstance(); // Initialize output system -require($cfg->readConfig('base_path') . 'inc/output.php'); +require($cfg->getConfigEntry('base_path') . 'inc/output.php'); // Initialize file i/o system -require($cfg->readConfig('base_path') . 'inc/file_io.php'); +require($cfg->getConfigEntry('base_path') . 'inc/file_io.php'); // Include the language sub-system -require($cfg->readConfig('base_path') . 'inc/language.php'); +require($cfg->getConfigEntry('base_path') . 'inc/language.php'); // This application needs a database connection then we have to simply include // the inc/database.php script -require($cfg->readConfig('base_path') . 'inc/database.php'); +require($cfg->getConfigEntry('base_path') . 'inc/database.php'); // [EOF] ?> diff --git a/application/admin/loader.php b/application/admin/loader.php index 26aff4e..6a14c74 100644 --- a/application/admin/loader.php +++ b/application/admin/loader.php @@ -28,7 +28,7 @@ $cfg = FrameworkConfiguration::getInstance(); // Load all classes for the application foreach ($lowerClasses as $className) { // Load the application classes - ClassLoader::getInstance()->scanClassPath(sprintf("%s/%s/%s", $cfg->readConfig('application_path'), $cfg->readConfig('app_name'), $className)); + ClassLoader::getInstance()->scanClassPath(sprintf("%s/%s/%s", $cfg->getConfigEntry('application_path'), $cfg->getConfigEntry('app_name'), $className)); } // END - if // Clean up the global namespace diff --git a/application/admin/main/commands/web/class_WebAdminUserLoginCommand.php b/application/admin/main/commands/web/class_WebAdminUserLoginCommand.php index 60e1d1b..52103d8 100644 --- a/application/admin/main/commands/web/class_WebAdminUserLoginCommand.php +++ b/application/admin/main/commands/web/class_WebAdminUserLoginCommand.php @@ -102,7 +102,7 @@ class WebAdminUserLoginCommand extends BaseCommand implements Commandable { */ public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) { // Which login type do we have? - switch ($this->getConfigInstance()->readConfig('login_type')) { + switch ($this->getConfigInstance()->getConfigEntry('login_type')) { case "username": // Login via username $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('username_verifier_filter')); break; diff --git a/application/admin/main/login/class_AdminUserLogin.php b/application/admin/main/login/class_AdminUserLogin.php index 2b0429e..75815c9 100644 --- a/application/admin/main/login/class_AdminUserLogin.php +++ b/application/admin/main/login/class_AdminUserLogin.php @@ -74,7 +74,7 @@ class AdminUserLogin extends BaseFrameworkSystem implements LoginableUser { $data = ""; // Get member class - $userClass = $this->getConfigInstance()->readConfig('user_class'); + $userClass = $this->getConfigInstance()->getConfigEntry('user_class'); // Get a user instance $userInstance = call_user_func_array(array($userClass, 'createMemberByRequest'), array($requestInstance)); diff --git a/application/admin/main/login/helper/class_AdminLoginHelper.php b/application/admin/main/login/helper/class_AdminLoginHelper.php index b825cef..d54d400 100644 --- a/application/admin/main/login/helper/class_AdminLoginHelper.php +++ b/application/admin/main/login/helper/class_AdminLoginHelper.php @@ -85,7 +85,7 @@ class AdminLoginHelper extends BaseLoginHelper implements HelpableLogin { * @return void */ protected function setDefaultAuthMethod () { - $this->authMethod = $this->getConfigInstance()->readConfig('auth_method_class'); + $this->authMethod = $this->getConfigInstance()->getConfigEntry('auth_method_class'); } /** diff --git a/application/admin/starter.php b/application/admin/starter.php index e0ea680..22c2af2 100644 --- a/application/admin/starter.php +++ b/application/admin/starter.php @@ -24,30 +24,30 @@ // Is there an application helper instance? We need the method main() for // maining the application -$app = call_user_func_array(array(FrameworkConfiguration::getInstance()->readConfig('app_helper_class'), 'getInstance'), array()); +$app = call_user_func_array(array(FrameworkConfiguration::getInstance()->getConfigEntry('app_helper_class'), 'getInstance'), array()); // Some sanity checks if ((empty($app)) || (is_null($app))) { // Something went wrong! ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because the helper class %s is not loaded.", $application, - FrameworkConfiguration::getInstance()->readConfig('app_helper_class') + FrameworkConfiguration::getInstance()->getConfigEntry('app_helper_class') )); } elseif (!is_object($app)) { // No object! ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because 'app' is not an object.", $application )); -} elseif (!method_exists($app, FrameworkConfiguration::getInstance()->readConfig('entry_method'))) { +} elseif (!method_exists($app, FrameworkConfiguration::getInstance()->getConfigEntry('entry_method'))) { // Method not found! ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because the method %s is missing.", $application, - FrameworkConfiguration::getInstance()->readConfig('entry_method') + FrameworkConfiguration::getInstance()->getConfigEntry('entry_method') )); } // Call user function -call_user_func_array(array($app, FrameworkConfiguration::getInstance()->readConfig('entry_method')), array()); +call_user_func_array(array($app, FrameworkConfiguration::getInstance()->getConfigEntry('entry_method')), array()); // [EOF] ?> diff --git a/index.php b/index.php index 0050046..cf898bf 100644 --- a/index.php +++ b/index.php @@ -80,13 +80,13 @@ final class ApplicationEntryPoint { $configInstance = FrameworkConfiguration::getInstance(); // Do we have debug installation? - if (($configInstance->readConfig('product_install_mode') == 'productive') || ($silentMode === true)) { + if (($configInstance->getConfigEntry('product_install_mode') == 'productive') || ($silentMode === true)) { // Abort here die(); } // END - if // Get some instances - $tpl = FrameworkConfiguration::getInstance()->readConfig('template_class'); + $tpl = FrameworkConfiguration::getInstance()->getConfigEntry('template_class'); $lang = LanguageSystem::getInstance(); // Get response instance @@ -190,13 +190,13 @@ final class ApplicationEntryPoint { require(self::detectCorePath() . '/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 framework classes - require($cfg->readConfig('base_path') . 'inc/classes.php'); + require($cfg->getConfigEntry('base_path') . 'inc/classes.php'); // Include the application selector - require($cfg->readConfig('base_path') . 'inc/selector.php'); + require($cfg->getConfigEntry('base_path') . 'inc/selector.php'); } // END - main() } // END - class