]> git.mxchange.org Git - hub.git/commitdiff
readConfig() is not naming convention, renamed to getConfigEntry()
authorRoland Häder <roland@mxchange.org>
Tue, 28 Jul 2009 17:27:35 +0000 (17:27 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 28 Jul 2009 17:27:35 +0000 (17:27 +0000)
application/hub/data.php
application/hub/init.php
application/hub/loader.php
application/hub/main/filter/node/class_NodeInitializationFilter.php
application/hub/main/listener/class_BaseListener.php
application/hub/main/nodes/boot/class_HubBootNode.php
application/hub/main/nodes/class_BaseHubNode.php
application/hub/main/resolver/command/console/class_HubConsoleCommandResolver.php
application/hub/starter.php
index.php

index aeb4450d037d6fc914864c8d1d3af95d551bfd70..d68aca4828ac4d2d301d509bf6ece0b0746e1ab1 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 944a222a73548503f549df04acd3e6d55b0d3cf5..915f478b4af4189c12f86bf3e2bd352cfd41c835 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');
 
 // Get's our IP address
 $_SERVER['SERVER_ADDR'] = ConsoleTools::acquireSelfIPAddress();
index 0cabbda78bb71839495fd68e46654c1ac0efead9..5b1f37c69195123bb2f575acb55d9a49be1a9719 100644 (file)
@@ -27,7 +27,7 @@ $cfg = FrameworkConfiguration::getInstance();
 // Load all classes for the application
 foreach ($lowerClasses as $class) {
        // Try to load the application classes
-       ClassLoader::getInstance()->scanClassPath(sprintf("%s/%s/%s", $cfg->readConfig("application_path"), $cfg->readConfig("app_name"), $class));
+       ClassLoader::getInstance()->scanClassPath(sprintf("%s/%s/%s", $cfg->getConfigEntry("application_path"), $cfg->getConfigEntry("app_name"), $class));
 } // END - foreach
 
 // Clean up the global namespace
index c8c48ada7019010cdfc3fd55087b329f2e9ca88e..40cb4046be9970c5c4a6bce217e0e0b585936eb3 100644 (file)
@@ -55,7 +55,7 @@ class NodeInitializationFilter extends BaseFilter implements Filterable {
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
                // The default node-mode is from our configuration
-               $nodeMode = $this->getConfigInstance()->readConfig('node_mode');
+               $nodeMode = $this->getConfigInstance()->getConfigEntry('node_mode');
 
                // Is the node 'mode' parameter set?
                if ($requestInstance->isRequestElementSet('mode')) {
index 31809ff5a0e80884d8426590bf8d53d58dc553f4..40c91c5c86ad7d7a8ab79030d85afa740143d662 100644 (file)
@@ -111,7 +111,7 @@ class BaseListener extends BaseHubSystem {
         * @return      void
         */
        public final function setListenAddressByConfiguration ($configEntry) {
-               $this->setListenAddress($this->getConfigInstance()->readConfig($configEntry));
+               $this->setListenAddress($this->getConfigInstance()->getConfigEntry($configEntry));
        }
 
        /**
@@ -121,7 +121,7 @@ class BaseListener extends BaseHubSystem {
         * @return      void
         */
        public final function setListenPortByConfiguration ($configEntry) {
-               $this->setListenPort($this->getConfigInstance()->readConfig($configEntry));
+               $this->setListenPort($this->getConfigInstance()->getConfigEntry($configEntry));
        }
 
        /**
index ff55bcd77e7125054888b4c669982185b60cbcd8..7696c1bea7e49008bac7be4a099a8fa1b8e3adc7 100644 (file)
@@ -61,7 +61,7 @@ class HubBootNode extends BaseHubNode implements NodeHelper, Registerable {
                // Now check if the IP address matches one of the bootstrap nodes
                if ($this->ifAddressMatchesBootstrappingNodes($_SERVER['SERVER_ADDR'])) {
                        // Get our port from configuration
-                       $ourPort = $this->getConfigInstance()->readConfig('node_tcp_listen_port');
+                       $ourPort = $this->getConfigInstance()->getConfigEntry('node_tcp_listen_port');
 
                        // Extract port
                        $bootPort = substr($this->getBootIpPort(), -strlen($ourPort), strlen($ourPort));
index ec335ef459aad8a8559aa0e2f2ade559bb84977f..07045edd82773c4b72a3670e2535f2cbcd955670 100644 (file)
@@ -107,7 +107,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable {
                $isFound = false;
 
                // Run through all configured IPs
-               foreach (explode(',', $this->getConfigInstance()->readConfig('hub_bootstrap_nodes')) as $ipPort) {
+               foreach (explode(',', $this->getConfigInstance()->getConfigEntry('hub_bootstrap_nodes')) as $ipPort) {
                        // Split it up in IP/port
                        $ipPortArray = explode(':', $ipPort);
 
@@ -124,7 +124,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable {
 
                                // Stop further searching
                                break;
-                       } elseif ($ipPortArray[0] == $this->getConfigInstance()->readConfig('node_listen_addr')) {
+                       } elseif ($ipPortArray[0] == $this->getConfigInstance()->getConfigEntry('node_listen_addr')) {
                                // IP matches listen address. At this point we really don't care
                                // if we can also listen on that address!
                                $isFound = true;
index 342d1f76c1b1965ddaa56e7aeff09fc02d590485..f5a7fe1bd82b56d9cc3f8aad417439a4992d9251 100644 (file)
@@ -89,7 +89,7 @@ class HubConsoleCommandResolver extends BaseCommandResolver implements CommandRe
                $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 HubConsoleCommandResolver extends BaseCommandResolver implements CommandRe
                $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 a177f0f839b1c99e1659c49d71b943087b2ddbbf..39633a9fad4a7689c0300535fa26b5c2e7d2de81 100644 (file)
@@ -26,7 +26,7 @@
 // maining the application
 $app = call_user_func_array(
        array(
-               FrameworkConfiguration::getInstance()->readConfig('app_helper_class'), 'getInstance'
+               FrameworkConfiguration::getInstance()->getConfigEntry('app_helper_class'), 'getInstance'
        ), array()
 );
 
@@ -35,23 +35,23 @@ 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