readConfig() is not naming convention, renamed to getConfigEntry()
authorRoland Häder <roland@mxchange.org>
Tue, 28 Jul 2009 17:27:49 +0000 (17:27 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 28 Jul 2009 17:27:49 +0000 (17:27 +0000)
application/mxchange/class_ApplicationHelper.php
application/mxchange/data.php
application/mxchange/init.php
application/mxchange/loader.php
application/mxchange/starter.php
index.php

index edea93394375789577b554daae56f6a6b9c1e4d6..1728a7475358a168230f6c71ee32f61b6f4e55c9 100644 (file)
@@ -201,7 +201,11 @@ class ApplicationHelper extends BaseApplication implements ManageableApplication
 
                // If it is null then get default command
                if (is_null($commandName)) {
+                       // Get default command
                        $commandName = $responseInstance->getDefaultCommand();
+
+                       // Set it in request
+                       $requestInstance->setRequestElement('page');
                } // END - if
 
                // Get a resolver
index 1923385669698031ded7ad10ccabcde52839baae..be9f0090682aaecc3338fd9caca469894d25cb79 100644 (file)
@@ -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()
 );
 
index 9cee54fbe39c29a29c39e711ba33995d8f5f896b..21dcbf956fe64bafd1cd445037c948f169e52b66 100644 (file)
 $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]
 ?>
index dbde16610f2d866f93ad4bb09d2c7e89ece5d3dc..c499a19335e1b8c224b12dbeb16975b2cc178e3e 100644 (file)
@@ -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
index 4586718874d83dc0ae9d25e3a7fa58678429500f..5a447f0b81dc8654e2f770e8399fa60b5ccf74b6 100644 (file)
 
 // 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 <span class=\"app_name\">%s</span> could not be launched because the helper class <span class=\"class_name\">%s</span> 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 <span class=\"app_name\">%s</span> could not be launched because &#39;app&#39; 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 <span class=\"app_name\">%s</span> could not be launched because the method <span class=\"method_name\">%s</span> 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]
 ?>
index 005004646b5cee9d87e2ae89b499f8f675e6604d..cf898bf7dbb77fe8967570faa0a48e168b4c4a5c 100644 (file)
--- 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