// 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()
);
$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();
// 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
*/
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')) {
* @return void
*/
public final function setListenAddressByConfiguration ($configEntry) {
- $this->setListenAddress($this->getConfigInstance()->readConfig($configEntry));
+ $this->setListenAddress($this->getConfigInstance()->getConfigEntry($configEntry));
}
/**
* @return void
*/
public final function setListenPortByConfiguration ($configEntry) {
- $this->setListenPort($this->getConfigInstance()->readConfig($configEntry));
+ $this->setListenPort($this->getConfigInstance()->getConfigEntry($configEntry));
}
/**
// 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));
$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);
// 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;
$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) {
$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) {
// maining the application
$app = call_user_func_array(
array(
- FrameworkConfiguration::getInstance()->readConfig('app_helper_class'), 'getInstance'
+ FrameworkConfiguration::getInstance()->getConfigEntry('app_helper_class'), 'getInstance'
), array()
);
// 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 '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 <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]
?>
$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
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