From d1588c284b277a7a4bcaba87311bf9689e24085b Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sun, 9 Aug 2015 23:02:17 +0200 Subject: [PATCH] Upgrade to latest 'core' changes which involves many changes. Signed-off-by: Roland Haeder --- application/lfdb2/class_ApplicationHelper.php | 12 +++++++++++- application/lfdb2/config.php | 19 +++++++++++-------- application/lfdb2/init.php | 3 --- application/lfdb2/loader.php | 14 ++------------ .../class_Lfdb2ConsoleControllerResolver.php | 4 ++-- core | 2 +- 6 files changed, 27 insertions(+), 27 deletions(-) diff --git a/application/lfdb2/class_ApplicationHelper.php b/application/lfdb2/class_ApplicationHelper.php index d93593a..d580401 100644 --- a/application/lfdb2/class_ApplicationHelper.php +++ b/application/lfdb2/class_ApplicationHelper.php @@ -143,6 +143,16 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica $this->shortName = (string) $shortName; } + /** + * Assigns extra application-depending data + * + * @param $templateInstance An instance of a CompileableTemplate + * @return void + * @todo Nothing to add? + */ + public function assignExtraTemplateData (CompileableTemplate $templateInstance) { + } + /** * Launches the LFDB2 system * @@ -155,7 +165,7 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica // Is no external IP set? if ($this->getConfigInstance()->getConfigEntry('external_ip') == '') { // Determine external IP - $this->getConfigInstance()->setConfigEntry('external_ip', ConsoleTools::determineExternalIp()); + $this->getConfigInstance()->setConfigEntry('external_ip', ConsoleTools::determineExternalAddress()); } // END - if // Default response is console diff --git a/application/lfdb2/config.php b/application/lfdb2/config.php index 9c0f73a..fca0ae1 100644 --- a/application/lfdb2/config.php +++ b/application/lfdb2/config.php @@ -24,8 +24,8 @@ // Some hub-specific configuration like port hostname where we will listen, etc. $cfg = FrameworkConfiguration::getSelfInstance(); -// CFG: INTERNAL-IP -$cfg->setConfigEntry('internal_ip', ConsoleTools::acquireSelfIPAddress()); +// CFG: INTERNAL-ADDRESS +$cfg->setConfigEntry('internal_address', ''); // CFG: EXTERNAL-IP $cfg->setConfigEntry('external_ip', ''); @@ -33,11 +33,14 @@ $cfg->setConfigEntry('external_ip', ''); // CFG: DEFAULT-CONSOLE-COMMAND $cfg->setConfigEntry('default_console_command', 'server'); -// CFG: DEFAULT-LFDB2CONSOLE-COMMAND -$cfg->setConfigEntry('default_lfdb2console_command', 'server'); +// CFG: DEFAULT-LFDB2-CONSOLE-COMMAND +$cfg->setConfigEntry('default_lfdb2_console_command', 'server'); -// CFG: LFDB2CONSOLE-CMD-SERVER-RESOLVER-CLASS -$cfg->setConfigEntry('lfdb2console_cmd_server_resolver_class', 'Lfdb2ConsoleCommandResolver'); +// CFG: DEFAULT-LFDB2-CONSOLE-CONTROLLER +$cfg->setConfigEntry('default_lfdb2_console_controller', 'server'); + +// CFG: LFDB2-CONSOLE-CMD-SERVER-RESOLVER-CLASS +$cfg->setConfigEntry('lfdb2_console_cmd_server_resolver_class', 'Lfdb2ConsoleCommandResolver'); // CFG: NEWS-DOWNLOAD-FILTER $cfg->setConfigEntry('news_download_filter', 'NewsDownloadFilter'); @@ -45,8 +48,8 @@ $cfg->setConfigEntry('news_download_filter', 'NewsDownloadFilter'); // CFG: NEWS-PROCESS-FILTER $cfg->setConfigEntry('news_process_filter', 'NewsProcessFilter'); -// CFG: NEWS-READER-CLASS -$cfg->setConfigEntry('news_reader_class', 'ConsoleNewsReader'); +// CFG: NEWS-READER-SERVER-CLASS +$cfg->setConfigEntry('news_reader_server_class', 'ConsoleNewsReader'); // CFG: NEWS-SERVER-LIMIT $cfg->setConfigEntry('news_server_limit', 5); diff --git a/application/lfdb2/init.php b/application/lfdb2/init.php index 7f4120e..41f74e4 100644 --- a/application/lfdb2/init.php +++ b/application/lfdb2/init.php @@ -34,8 +34,5 @@ ApplicationHelper::createDebugInstance('ApplicationHelper'); // the inc/database.php script require($cfg->getConfigEntry('base_path') . 'inc/database.php'); -// Get's our IP address -ConsoleTools::acquireSelfIPAddress(); - // [EOF] ?> diff --git a/application/lfdb2/loader.php b/application/lfdb2/loader.php index 9aca20b..09d285a 100644 --- a/application/lfdb2/loader.php +++ b/application/lfdb2/loader.php @@ -21,18 +21,8 @@ * along with this program. If not, see . */ -// Get config instance -$cfg = FrameworkConfiguration::getSelfInstance(); - -// Load all classes for the application -foreach ($lowerClasses as $class) { - // Try to load the application classes - ClassLoader::getSelfInstance()->scanClassPath(sprintf('%s/%s/%s', $cfg->getConfigEntry('application_path'), $cfg->getConfigEntry('app_name'), $class)); -} // END - foreach - -// Clean up the global namespace -unset($lowerClasses); -unset($class); +// Scan for application's classes, exceptions and interfaces +ClassLoader::scanApplicationClasses(); // [EOF] ?> diff --git a/application/lfdb2/main/resolver/controller/console/class_Lfdb2ConsoleControllerResolver.php b/application/lfdb2/main/resolver/controller/console/class_Lfdb2ConsoleControllerResolver.php index 00ef4ad..c925880 100644 --- a/application/lfdb2/main/resolver/controller/console/class_Lfdb2ConsoleControllerResolver.php +++ b/application/lfdb2/main/resolver/controller/console/class_Lfdb2ConsoleControllerResolver.php @@ -31,8 +31,8 @@ class Lfdb2ConsoleControllerResolver extends BaseControllerResolver implements C // Call parent constructor parent::__construct(__CLASS__); - // Set prefix to "Lfdb2Console" - $this->setClassPrefix('Lfdb2Console'); + // Set prefix to "lfdb2_console" + $this->setClassPrefix('lfdb2_console'); } /** diff --git a/core b/core index a0551c3..23aa45d 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit a0551c30b2e11aadba3f0513ef67c36ca7e60552 +Subproject commit 23aa45d4a6205e26184190ca446316d06a9b4648 -- 2.39.5