From fbb1b0d01b4a17f9c37f7098080f60ca8a8cca1b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 28 Jul 2009 17:16:52 +0000 Subject: [PATCH] readConfig() is not naming convention, renamed to getConfigEntry() --- application/install/data.php | 2 +- application/install/init.php | 8 ++++---- application/install/loader.php | 2 +- application/install/starter.php | 10 +++++----- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/application/install/data.php b/application/install/data.php index 453187e..2c32bb8 100644 --- a/application/install/data.php +++ b/application/install/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/install/init.php b/application/install/init.php index 5b82a77..3baf31f 100644 --- a/application/install/init.php +++ b/application/install/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/install/loader.php b/application/install/loader.php index 3441968..b46c98f 100644 --- a/application/install/loader.php +++ b/application/install/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/install/starter.php b/application/install/starter.php index 841486a..1e6d888 100644 --- a/application/install/starter.php +++ b/application/install/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] ?> -- 2.39.5