From: Roland Häder Date: Mon, 1 Jan 2018 02:45:25 +0000 (+0100) Subject: Continued (first wave of migration): X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2e0e0091899925b6fd5e1b147dfcf7f3481614af;p=city.git Continued (first wave of migration): - updated core framework to latest commit (with namespaces!) - removed discouraged ?> tag closer Signed-off-by: Roland Häder --- diff --git a/application/city/class_ApplicationHelper.php b/application/city/class_ApplicationHelper.php index fa8d88d..78e01ba 100644 --- a/application/city/class_ApplicationHelper.php +++ b/application/city/class_ApplicationHelper.php @@ -1,4 +1,17 @@ * @version 0.0 - * @copyright Copyright (c) 2015, 2016 City Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 City Developer Team * @license GNU GPL 3.0 or any newer version * * This program is free software: you can redistribute it and/or modify @@ -144,37 +157,54 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica } /** - * Launches the test suite + * 1) Setups application data * * @return void */ - public final function entryPoint () { - // Set this application in registry - Registry::getRegistry()->addInstance('app', $this); + public function setupApplicationData () { + // Set all application data + $this->setAppName('Unit tests and more'); + $this->setAppVersion('0.0.0'); + $this->setAppShortName('tests'); + } - // Default response is console - $response = self::getResponseTypeFromSystem(); - $responseType = self::getResponseTypeFromSystem(); + /** + * 2) Does initial stuff before starting the application + * + * @return void + */ + public function initApplication () { + // Get config instance + $cfg = FrameworkBootstrap::getConfigurationInstance(); - // Create a new request object - $requestInstance = ObjectFactory::createObjectByName(self::convertToClassName($response) . 'Request'); + // Initialize output system + self::createDebugInstance('ApplicationHelper'); - // Remember request instance here - $this->setRequestInstance($requestInstance); + /* + * This application needs a database connection then simply call init + * method. + */ + FrameworkBootstrap::initDatabaseInstance(); - // Do we have another response? - if ($requestInstance->isRequestElementSet('request')) { - // Then use it - $response = strtolower($requestInstance->getRequestElement('request')); - $responseType = $response; - } // END - if + // Register core tests + ClassLoader::registerTestsPath('framework/main/tests'); - // ... and a new response object - $responseClass = sprintf('%sResponse', self::convertToClassName($response)); - $responseInstance = ObjectFactory::createObjectByName($responseClass, array($this)); + // Register own tests + ClassLoader::registerTestsPath('application/tests/tests'); - // Remember response instance here - $this->setResponseInstance($responseInstance); + // Scan for them now + ClassLoader::scanTestsClasses(); + } + + /** + * 3) Launches the application + * + * @return void + */ + public function launchApplication () { + // Get request/response instances + $requestInstance = FrameworkBootstrap::getRequestInstance(); + $responseInstance = FrameworkBootstrap::getResponseInstance(); // Get the parameter from the request $commandName = $requestInstance->getRequestElement('command'); @@ -189,33 +219,26 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica } // END - if // Get a controller resolver - $resolverClass = self::convertToClassName($this->getAppShortName() . '_' . $responseType . '_controller_resolver'); + $resolverClass = sprintf( + 'Org\Mxchange\CoreFramework\Tests\Resolver\Controller\%s', + self::convertToClassName(sprintf( + '%s_%s_controller_resolver', + $this->getAppShortName(), + FrameworkBootstrap::getRequestTypeFromSystem() + )) + ); $resolverInstance = ObjectFactory::createObjectByName($resolverClass, array($commandName, $this)); // Get a controller instance as well $this->setControllerInstance($resolverInstance->resolveController()); - // Initialize language system - $languageInstance = ObjectFactory::createObjectByConfiguredName('language_system_class'); - - // And set it here - $this->setLanguageInstance($languageInstance); - - // Launch the game here + // Launch the test suite here $this->getControllerInstance()->handleRequest($requestInstance, $responseInstance); // -------------------------- Shutdown phase -------------------------- + self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MAIN: Shutdown in progress ...'); $this->getControllerInstance()->executeShutdownFilters($requestInstance, $responseInstance); - } - - /** - * Assigns extra application-depending data - * - * @param $templateInstance An instance of a CompileableTemplate - * @return void - * @todo Nothing to add? - */ - public function assignExtraTemplateData (CompileableTemplate $templateInstance) { + self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MAIN: Shutdown completed. (This is the last line.)'); } /** @@ -240,7 +263,16 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica public function buildMasterTemplateName () { return 'city_main'; } -} -// [EOF] -?> + /** + * Assigns extra application-depending data + * + * @param $templateInstance An instance of a CompileableTemplate + * @return void + * @todo Nothing to add? + */ + public function assignExtraTemplateData (CompileableTemplate $templateInstance) { + $this->partialStub('Unfinished method. templateInstance=' . $templateInstance->__toString()); + } + +} diff --git a/application/city/classes/actions/class_ b/application/city/classes/actions/class_ index f8dc518..a89fce5 100644 --- a/application/city/classes/actions/class_ +++ b/application/city/classes/actions/class_ @@ -77,6 +77,3 @@ class ???Action extends BaseCityAction implements Commandable, Registerable { // Unfinished method } } - -// [EOF] -?> diff --git a/application/city/classes/actions/class_BaseCityAction.php b/application/city/classes/actions/class_BaseCityAction.php index 9408e5f..6db2581 100644 --- a/application/city/classes/actions/class_BaseCityAction.php +++ b/application/city/classes/actions/class_BaseCityAction.php @@ -57,6 +57,3 @@ class BaseCityAction extends BaseAction { // Unfinished method } } - -// [EOF] -?> diff --git a/application/city/classes/actions/html/city/class_HtmlCityLoginCityMapAction.php b/application/city/classes/actions/html/city/class_HtmlCityLoginCityMapAction.php index b45dcf4..730d687 100644 --- a/application/city/classes/actions/html/city/class_HtmlCityLoginCityMapAction.php +++ b/application/city/classes/actions/html/city/class_HtmlCityLoginCityMapAction.php @@ -74,6 +74,3 @@ class HtmlCityLoginCityMapAction extends BaseCityAction implements Commandable, // Unfinished method } } - -// [EOF] -?> diff --git a/application/city/classes/actions/html/class_HtmlCityLoginGovernmentAction.php b/application/city/classes/actions/html/class_HtmlCityLoginGovernmentAction.php index aba18b5..2747667 100644 --- a/application/city/classes/actions/html/class_HtmlCityLoginGovernmentAction.php +++ b/application/city/classes/actions/html/class_HtmlCityLoginGovernmentAction.php @@ -74,6 +74,3 @@ class HtmlCityLoginGovernmentAction extends BaseCityAction implements Commandabl // Unfinished method } } - -// [EOF] -?> diff --git a/application/city/classes/actions/html/class_HtmlCityLoginLogoutAction.php b/application/city/classes/actions/html/class_HtmlCityLoginLogoutAction.php index bd202c0..46a35d8 100644 --- a/application/city/classes/actions/html/class_HtmlCityLoginLogoutAction.php +++ b/application/city/classes/actions/html/class_HtmlCityLoginLogoutAction.php @@ -76,6 +76,3 @@ class HtmlCityLoginLogoutAction extends BaseCityAction implements Commandable, R $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter')); } } - -// [EOF] -?> diff --git a/application/city/classes/actions/html/class_HtmlCityLoginProfileAction.php b/application/city/classes/actions/html/class_HtmlCityLoginProfileAction.php index 21b919e..9acb5d3 100644 --- a/application/city/classes/actions/html/class_HtmlCityLoginProfileAction.php +++ b/application/city/classes/actions/html/class_HtmlCityLoginProfileAction.php @@ -77,6 +77,3 @@ class HtmlCityLoginProfileAction extends BaseCityAction implements Commandable, $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter')); } } - -// [EOF] -?> diff --git a/application/city/classes/actions/html/class_HtmlCityLoginStatusProblemAction.php b/application/city/classes/actions/html/class_HtmlCityLoginStatusProblemAction.php index e45545e..168d172 100644 --- a/application/city/classes/actions/html/class_HtmlCityLoginStatusProblemAction.php +++ b/application/city/classes/actions/html/class_HtmlCityLoginStatusProblemAction.php @@ -77,6 +77,3 @@ class HtmlCityLoginStatusProblemAction extends BaseCityAction implements Command $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter')); } } - -// [EOF] -?> diff --git a/application/city/classes/actions/html/class_HtmlCityLoginWelcomeAction.php b/application/city/classes/actions/html/class_HtmlCityLoginWelcomeAction.php index 38acd26..f3aee4e 100644 --- a/application/city/classes/actions/html/class_HtmlCityLoginWelcomeAction.php +++ b/application/city/classes/actions/html/class_HtmlCityLoginWelcomeAction.php @@ -74,6 +74,3 @@ class HtmlCityLoginWelcomeAction extends BaseCityAction implements Commandable, // Unfinished method } } - -// [EOF] -?> diff --git a/application/city/classes/city_daemon/class_ b/application/city/classes/city_daemon/class_ index dd27a87..be34595 100644 --- a/application/city/classes/city_daemon/class_ +++ b/application/city/classes/city_daemon/class_ @@ -93,6 +93,3 @@ class Simulation???CityDaemon extends BaseCity implements CityHelper, Registerab $this->partialStub('Please add some tasks or empty this method.'); } } - -// [EOF] -?> diff --git a/application/city/classes/city_daemon/class_BaseCityDaemon.php b/application/city/classes/city_daemon/class_BaseCityDaemon.php index 1fe1d14..45757a0 100644 --- a/application/city/classes/city_daemon/class_BaseCityDaemon.php +++ b/application/city/classes/city_daemon/class_BaseCityDaemon.php @@ -263,6 +263,3 @@ class BaseCityDaemon extends BaseCitySystem implements Updateable, AddableCriter $sectionsInstance->expandMaps(); } } - -// [EOF] -?> diff --git a/application/city/classes/city_daemon/default/class_SimulationDefaultCityDaemon.php b/application/city/classes/city_daemon/default/class_SimulationDefaultCityDaemon.php index 88a1c0d..759f05a 100644 --- a/application/city/classes/city_daemon/default/class_SimulationDefaultCityDaemon.php +++ b/application/city/classes/city_daemon/default/class_SimulationDefaultCityDaemon.php @@ -90,6 +90,3 @@ class SimulationDefaultCityDaemon extends BaseCityDaemon implements CityHelper, $this->partialStub('Please add some tasks or empty this method.'); } } - -// [EOF] -?> diff --git a/application/city/classes/class_ b/application/city/classes/class_ index 6a4b9ad..81c9847 100644 --- a/application/city/classes/class_ +++ b/application/city/classes/class_ @@ -45,6 +45,3 @@ class ??? extends BaseCitySystem implements === { return $!!!Instance; } } - -// [EOF] -?> diff --git a/application/city/classes/class_Base b/application/city/classes/class_Base index a732a10..75f0934 100644 --- a/application/city/classes/class_Base +++ b/application/city/classes/class_Base @@ -33,6 +33,3 @@ class Base??? extends BaseCitySystem { parent::__construct($className); } } - -// [EOF] -?> diff --git a/application/city/classes/class_BaseCitySystem.php b/application/city/classes/class_BaseCitySystem.php index 79edc0d..f4448a0 100644 --- a/application/city/classes/class_BaseCitySystem.php +++ b/application/city/classes/class_BaseCitySystem.php @@ -64,6 +64,3 @@ class BaseCitySystem extends BaseFrameworkSystem { $this->cityInstance = $cityInstance; } } - -// [EOF] -?> diff --git a/application/city/classes/commands/console/class_CityConsoleDaemonCommand.php b/application/city/classes/commands/console/class_CityConsoleDaemonCommand.php index 449363f..de4e495 100644 --- a/application/city/classes/commands/console/class_CityConsoleDaemonCommand.php +++ b/application/city/classes/commands/console/class_CityConsoleDaemonCommand.php @@ -133,6 +133,3 @@ class CityConsoleDaemonCommand extends BaseCommand implements Commandable { $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('city_daemon_shutdown_city_filter')); } } - -// [EOF] -?> diff --git a/application/city/classes/commands/html/class_CityHtmlCityGuestLoginCommand.php b/application/city/classes/commands/html/class_CityHtmlCityGuestLoginCommand.php index f9ad327..e1d8d4a 100644 --- a/application/city/classes/commands/html/class_CityHtmlCityGuestLoginCommand.php +++ b/application/city/classes/commands/html/class_CityHtmlCityGuestLoginCommand.php @@ -107,6 +107,3 @@ class CityHtmlCityGuestLoginCommand extends BaseCommand implements Commandable { $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('captcha_guest_verifier_filter')); } } - -// [EOF] -?> diff --git a/application/city/classes/commands/html/class_CityHtmlCityMapCommand.php b/application/city/classes/commands/html/class_CityHtmlCityMapCommand.php index 381a985..ce56651 100644 --- a/application/city/classes/commands/html/class_CityHtmlCityMapCommand.php +++ b/application/city/classes/commands/html/class_CityHtmlCityMapCommand.php @@ -102,6 +102,3 @@ class CityHtmlCityMapCommand extends BaseCommand implements Commandable { //$controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('email_validator_filter')); } } - -// [EOF] -?> diff --git a/application/city/classes/commands/html/class_CityHtmlCityRegisterCommand.php b/application/city/classes/commands/html/class_CityHtmlCityRegisterCommand.php index c66be4e..c555b10 100644 --- a/application/city/classes/commands/html/class_CityHtmlCityRegisterCommand.php +++ b/application/city/classes/commands/html/class_CityHtmlCityRegisterCommand.php @@ -114,6 +114,3 @@ class CityHtmlCityRegisterCommand extends BaseCommand implements Commandable { $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('birthday_register_verifier_filter')); } } - -// [EOF] -?> diff --git a/application/city/classes/commands/html/class_CityHtmlCityUserLoginCommand.php b/application/city/classes/commands/html/class_CityHtmlCityUserLoginCommand.php index 3f2580c..02d30b9 100644 --- a/application/city/classes/commands/html/class_CityHtmlCityUserLoginCommand.php +++ b/application/city/classes/commands/html/class_CityHtmlCityUserLoginCommand.php @@ -119,6 +119,3 @@ class CityHtmlCityUserLoginCommand extends BaseCommand implements Commandable { $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('captcha_user_verifier_filter')); } } - -// [EOF] -?> diff --git a/application/city/classes/commands/html/class_CityHtmlConfirmCommand.php b/application/city/classes/commands/html/class_CityHtmlConfirmCommand.php index fc48015..40636c6 100644 --- a/application/city/classes/commands/html/class_CityHtmlConfirmCommand.php +++ b/application/city/classes/commands/html/class_CityHtmlConfirmCommand.php @@ -141,6 +141,3 @@ class CityHtmlConfirmCommand extends BaseCommand implements Commandable { // Empty for now } } - -// [EOF] -?> diff --git a/application/city/classes/commands/html/class_CityHtmlDoFormCommand.php b/application/city/classes/commands/html/class_CityHtmlDoFormCommand.php index 3ebfec5..499d604 100644 --- a/application/city/classes/commands/html/class_CityHtmlDoFormCommand.php +++ b/application/city/classes/commands/html/class_CityHtmlDoFormCommand.php @@ -73,6 +73,3 @@ class CityHtmlDoFormCommand extends BaseCommand implements Commandable { } } - -// [EOF] -?> diff --git a/application/city/classes/commands/html/class_CityHtmlHomeCommand.php b/application/city/classes/commands/html/class_CityHtmlHomeCommand.php index 4b96d2a..77f6e73 100644 --- a/application/city/classes/commands/html/class_CityHtmlHomeCommand.php +++ b/application/city/classes/commands/html/class_CityHtmlHomeCommand.php @@ -86,6 +86,3 @@ class CityHtmlHomeCommand extends BaseCommand implements Commandable { //$controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('node_php_requirements_filter')); } } - -// [EOF] -?> diff --git a/application/city/classes/commands/html/class_CityHtmlLoginAreaCommand.php b/application/city/classes/commands/html/class_CityHtmlLoginAreaCommand.php index 27f9506..60cab3f 100644 --- a/application/city/classes/commands/html/class_CityHtmlLoginAreaCommand.php +++ b/application/city/classes/commands/html/class_CityHtmlLoginAreaCommand.php @@ -198,6 +198,3 @@ class CityHtmlLoginAreaCommand extends BaseCommand implements Commandable { Registry::getRegistry()->addInstance('action', $actionInstance); } } - -// [EOF] -?> diff --git a/application/city/classes/commands/html/class_CityHtmlLoginCommand.php b/application/city/classes/commands/html/class_CityHtmlLoginCommand.php index e4a4446..bd1327d 100644 --- a/application/city/classes/commands/html/class_CityHtmlLoginCommand.php +++ b/application/city/classes/commands/html/class_CityHtmlLoginCommand.php @@ -101,8 +101,10 @@ class CityHtmlLoginCommand extends BaseCommand implements Commandable, Registera // Set title $templateInstance->assignVariable('title', $this->getLanguageInstance()->getMessage('page_login_title')); - // Construct the menu in every command. We could do this in BaseCommand class. But this means - // *every* command has a navigation system and that is want we don't want. + /* + * Construct the menu in every command. We could do this in BaseCommand class. But this means + * *every* command has a navigation system and that is want we don't want. + */ $menuInstance = ObjectFactory::createObjectByConfiguredName('login_menu_class', array($applicationInstance)); // Render the menu @@ -133,6 +135,3 @@ class CityHtmlLoginCommand extends BaseCommand implements Commandable, Registera // Empty for now } } - -// [EOF] -?> diff --git a/application/city/classes/commands/html/class_CityHtmlLoginFailedCommand.php b/application/city/classes/commands/html/class_CityHtmlLoginFailedCommand.php index c591d57..8bfcf41 100644 --- a/application/city/classes/commands/html/class_CityHtmlLoginFailedCommand.php +++ b/application/city/classes/commands/html/class_CityHtmlLoginFailedCommand.php @@ -130,6 +130,3 @@ class CityHtmlLoginFailedCommand extends BaseCommand implements Commandable { // Empty for now } } - -// [EOF] -?> diff --git a/application/city/classes/commands/html/class_CityHtmlLogoutCommand.php b/application/city/classes/commands/html/class_CityHtmlLogoutCommand.php index 44042bc..cbf5197 100644 --- a/application/city/classes/commands/html/class_CityHtmlLogoutCommand.php +++ b/application/city/classes/commands/html/class_CityHtmlLogoutCommand.php @@ -84,6 +84,3 @@ class CityHtmlLogoutCommand extends BaseCommand implements Commandable { // Empty for now } } - -// [EOF] -?> diff --git a/application/city/classes/commands/html/class_CityHtmlRegisterCommand.php b/application/city/classes/commands/html/class_CityHtmlRegisterCommand.php index 70f43fd..17f256d 100644 --- a/application/city/classes/commands/html/class_CityHtmlRegisterCommand.php +++ b/application/city/classes/commands/html/class_CityHtmlRegisterCommand.php @@ -75,6 +75,3 @@ class CityHtmlRegisterCommand extends BaseCommand implements Commandable { public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) { } } - -// [EOF] -?> diff --git a/application/city/classes/commands/html/class_CityHtmlResendLinkCommand.php b/application/city/classes/commands/html/class_CityHtmlResendLinkCommand.php index 47991bb..73e4f48 100644 --- a/application/city/classes/commands/html/class_CityHtmlResendLinkCommand.php +++ b/application/city/classes/commands/html/class_CityHtmlResendLinkCommand.php @@ -130,6 +130,3 @@ class CityHtmlResendLinkCommand extends BaseCommand implements Commandable { $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_unconfirmed_filter')); } } - -// [EOF] -?> diff --git a/application/city/classes/commands/html/class_HtmlLogoutDoneCommand.php b/application/city/classes/commands/html/class_HtmlLogoutDoneCommand.php index 5f20770..28f0d0f 100644 --- a/application/city/classes/commands/html/class_HtmlLogoutDoneCommand.php +++ b/application/city/classes/commands/html/class_HtmlLogoutDoneCommand.php @@ -130,6 +130,3 @@ class HtmlLogoutDoneCommand extends BaseCommand implements Commandable { // Empty for now } } - -// [EOF] -?> diff --git a/application/city/classes/controller/console/class_CityConsoleDefaultNewsController.php b/application/city/classes/controller/console/class_CityConsoleDefaultNewsController.php index e408d22..9379b5e 100644 --- a/application/city/classes/controller/console/class_CityConsoleDefaultNewsController.php +++ b/application/city/classes/controller/console/class_CityConsoleDefaultNewsController.php @@ -130,6 +130,3 @@ class CityConsoleDefaultNewsController extends BaseController implements Control $this->executeFilters('activation', $requestInstance, $responseInstance); } } - -// [EOF] -?> diff --git a/application/city/classes/controller/html/class_CityHtmlConfirmController.php b/application/city/classes/controller/html/class_CityHtmlConfirmController.php index e2e4ead..be70e6e 100644 --- a/application/city/classes/controller/html/class_CityHtmlConfirmController.php +++ b/application/city/classes/controller/html/class_CityHtmlConfirmController.php @@ -68,6 +68,3 @@ class CityHtmlConfirmController extends BaseController implements Controller { $this->executeGenericPrePostCommand($requestInstance, $responseInstance); } } - -// [EOF] -?> diff --git a/application/city/classes/controller/html/class_CityHtmlDefaultNewsController.php b/application/city/classes/controller/html/class_CityHtmlDefaultNewsController.php index b5742c2..709fd07 100644 --- a/application/city/classes/controller/html/class_CityHtmlDefaultNewsController.php +++ b/application/city/classes/controller/html/class_CityHtmlDefaultNewsController.php @@ -70,6 +70,3 @@ class CityHtmlDefaultNewsController extends BaseController implements Controller $this->executeGenericPrePostCommand($requestInstance, $responseInstance); } } - -// [EOF] -?> diff --git a/application/city/classes/controller/html/class_CityHtmlLoginController.php b/application/city/classes/controller/html/class_CityHtmlLoginController.php index 3cd8b9d..f155f67 100644 --- a/application/city/classes/controller/html/class_CityHtmlLoginController.php +++ b/application/city/classes/controller/html/class_CityHtmlLoginController.php @@ -68,6 +68,3 @@ class CityHtmlLoginController extends BaseController implements Controller { $this->executeGenericPrePostCommand($requestInstance, $responseInstance); } } - -// [EOF] -?> diff --git a/application/city/classes/controller/html/class_CityHtmlLoginFailedController.php b/application/city/classes/controller/html/class_CityHtmlLoginFailedController.php index 1540091..136f1fc 100644 --- a/application/city/classes/controller/html/class_CityHtmlLoginFailedController.php +++ b/application/city/classes/controller/html/class_CityHtmlLoginFailedController.php @@ -75,6 +75,3 @@ class CityHtmlLoginFailedController extends BaseController implements Controller $responseInstance->flushBuffer(); } } - -// [EOF] -?> diff --git a/application/city/classes/controller/html/class_CityHtmlLogoutController.php b/application/city/classes/controller/html/class_CityHtmlLogoutController.php index a3ae8ce..ce7e1dd 100644 --- a/application/city/classes/controller/html/class_CityHtmlLogoutController.php +++ b/application/city/classes/controller/html/class_CityHtmlLogoutController.php @@ -82,6 +82,3 @@ class CityHtmlLogoutController extends BaseController implements Controller { $responseInstance->flushBuffer(); } } - -// [EOF] -?> diff --git a/application/city/classes/controller/html/class_CityHtmlLogoutDoneController.php b/application/city/classes/controller/html/class_CityHtmlLogoutDoneController.php index 3c24755..a8f0031 100644 --- a/application/city/classes/controller/html/class_CityHtmlLogoutDoneController.php +++ b/application/city/classes/controller/html/class_CityHtmlLogoutDoneController.php @@ -67,6 +67,3 @@ class CityHtmlLogoutDoneController extends BaseController implements Controller $this->executeGenericPrePostCommand($requestInstance, $responseInstance); } } - -// [EOF] -?> diff --git a/application/city/classes/controller/html/class_CityHtmlRegisterController.php b/application/city/classes/controller/html/class_CityHtmlRegisterController.php index ce1477c..1e81ca4 100644 --- a/application/city/classes/controller/html/class_CityHtmlRegisterController.php +++ b/application/city/classes/controller/html/class_CityHtmlRegisterController.php @@ -67,6 +67,3 @@ class CityHtmlRegisterController extends BaseController implements Controller { $this->executeGenericPrePostCommand($requestInstance, $responseInstance); } } - -// [EOF] -?> diff --git a/application/city/classes/controller/html/form/class_CityHtmlDoFormController.php b/application/city/classes/controller/html/form/class_CityHtmlDoFormController.php index 25cf699..efeb3e2 100644 --- a/application/city/classes/controller/html/form/class_CityHtmlDoFormController.php +++ b/application/city/classes/controller/html/form/class_CityHtmlDoFormController.php @@ -102,6 +102,3 @@ class CityHtmlDoFormController extends BaseController implements Controller { $responseInstance->flushBuffer(); } } - -// [EOF] -?> diff --git a/application/city/classes/controller/html/login/class_CityHtmlLoginAreaController.php b/application/city/classes/controller/html/login/class_CityHtmlLoginAreaController.php index c9dfba0..2b3e123 100644 --- a/application/city/classes/controller/html/login/class_CityHtmlLoginAreaController.php +++ b/application/city/classes/controller/html/login/class_CityHtmlLoginAreaController.php @@ -82,6 +82,3 @@ class CityHtmlLoginAreaController extends BaseController implements Controller { $this->genericHanleRequestLoginAreaFailedRedirect($requestInstance, $responseInstance); } } - -// [EOF] -?> diff --git a/application/city/classes/database/frontend/city/class_CityInformationDatabaseWrapper.php b/application/city/classes/database/frontend/city/class_CityInformationDatabaseWrapper.php index e1a378f..c9f53a9 100644 --- a/application/city/classes/database/frontend/city/class_CityInformationDatabaseWrapper.php +++ b/application/city/classes/database/frontend/city/class_CityInformationDatabaseWrapper.php @@ -266,6 +266,3 @@ class CityInformationDatabaseWrapper extends BaseDatabaseWrapper implements City return $cityIds; } } - -// [EOF] -?> diff --git a/application/city/classes/database/frontend/city_entities/districts/class_CityDistrictsDatabaseWrapper.php b/application/city/classes/database/frontend/city_entities/districts/class_CityDistrictsDatabaseWrapper.php index e07f36f..246ef5b 100644 --- a/application/city/classes/database/frontend/city_entities/districts/class_CityDistrictsDatabaseWrapper.php +++ b/application/city/classes/database/frontend/city_entities/districts/class_CityDistrictsDatabaseWrapper.php @@ -84,6 +84,3 @@ class CityDistrictsDatabaseWrapper extends BaseDatabaseWrapper implements CityDi return $isFound; } } - -// [EOF] -?> diff --git a/application/city/classes/database/frontend/city_entities/lots/class_CityLotsDatabaseWrapper.php b/application/city/classes/database/frontend/city_entities/lots/class_CityLotsDatabaseWrapper.php index 4325349..8563f1b 100644 --- a/application/city/classes/database/frontend/city_entities/lots/class_CityLotsDatabaseWrapper.php +++ b/application/city/classes/database/frontend/city_entities/lots/class_CityLotsDatabaseWrapper.php @@ -85,6 +85,3 @@ class CityLotsDatabaseWrapper extends BaseDatabaseWrapper implements CityLotsWra return $isFound; } } - -// [EOF] -?> diff --git a/application/city/classes/database/frontend/city_entities/sections/class_CitySectionsDatabaseWrapper.php b/application/city/classes/database/frontend/city_entities/sections/class_CitySectionsDatabaseWrapper.php index 7dc2b23..9e2433e 100644 --- a/application/city/classes/database/frontend/city_entities/sections/class_CitySectionsDatabaseWrapper.php +++ b/application/city/classes/database/frontend/city_entities/sections/class_CitySectionsDatabaseWrapper.php @@ -263,6 +263,3 @@ class CitySectionsDatabaseWrapper extends BaseDatabaseWrapper implements CitySec self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: A total of ' . $totalSections . ' sections has been written for city id ' . $cityId . '.'); } } - -// [EOF] -?> diff --git a/application/city/classes/database/frontend/game_options/class_CityGameOptionsDatabaseWrapper.php b/application/city/classes/database/frontend/game_options/class_CityGameOptionsDatabaseWrapper.php index c5492c0..9eb3294 100644 --- a/application/city/classes/database/frontend/game_options/class_CityGameOptionsDatabaseWrapper.php +++ b/application/city/classes/database/frontend/game_options/class_CityGameOptionsDatabaseWrapper.php @@ -56,6 +56,3 @@ class CityGameOptionsDatabaseWrapper extends BaseDatabaseWrapper implements City return $wrapperInstance; } } - -// [EOF] -?> diff --git a/application/city/classes/database/frontend/region/class_RegionInformationDatabaseWrapper.php b/application/city/classes/database/frontend/region/class_RegionInformationDatabaseWrapper.php index c55246f..4684695 100644 --- a/application/city/classes/database/frontend/region/class_RegionInformationDatabaseWrapper.php +++ b/application/city/classes/database/frontend/region/class_RegionInformationDatabaseWrapper.php @@ -170,6 +170,3 @@ class RegionInformationDatabaseWrapper extends BaseDatabaseWrapper implements Re assert($this->ifRegionExists($regionName)); } } - -// [EOF] -?> diff --git a/application/city/classes/database/frontend/region_map/class_RegionMapDatabaseWrapper.php b/application/city/classes/database/frontend/region_map/class_RegionMapDatabaseWrapper.php index 6a74449..de31245 100644 --- a/application/city/classes/database/frontend/region_map/class_RegionMapDatabaseWrapper.php +++ b/application/city/classes/database/frontend/region_map/class_RegionMapDatabaseWrapper.php @@ -98,6 +98,3 @@ class RegionMapDatabaseWrapper extends BaseDatabaseWrapper implements RegionMapW assert($this->ifRegionExists($regionName)); } } - -// [EOF] -?> diff --git a/application/city/classes/factories/city_daemon/class_CityDaemonFactory.php b/application/city/classes/factories/city_daemon/class_CityDaemonFactory.php index fb039b8..dc6b1d5 100644 --- a/application/city/classes/factories/city_daemon/class_CityDaemonFactory.php +++ b/application/city/classes/factories/city_daemon/class_CityDaemonFactory.php @@ -84,6 +84,3 @@ class CityDaemonFactory extends ObjectFactory { return $cityInstance; } } - -// [EOF] -?> diff --git a/application/city/classes/factories/manager/class_ManagerFactory.php b/application/city/classes/factories/manager/class_ManagerFactory.php index 7a8e278..7f740a1 100644 --- a/application/city/classes/factories/manager/class_ManagerFactory.php +++ b/application/city/classes/factories/manager/class_ManagerFactory.php @@ -61,6 +61,3 @@ class ManagerFactory extends ObjectFactory { return $managerInstance; } } - -// [EOF] -?> diff --git a/application/city/classes/factories/states/city/class_CityStateFactory.php b/application/city/classes/factories/states/city/class_CityStateFactory.php index 1099f70..b564e08 100644 --- a/application/city/classes/factories/states/city/class_CityStateFactory.php +++ b/application/city/classes/factories/states/city/class_CityStateFactory.php @@ -62,6 +62,3 @@ class CityStateFactory extends ObjectFactory { return $stateInstance; } } - -// [EOF] -?> diff --git a/application/city/classes/filter/bootstrap/city_daemon/class_CityDaemonBootstrap b/application/city/classes/filter/bootstrap/city_daemon/class_CityDaemonBootstrap index 05e5541..3da5633 100644 --- a/application/city/classes/filter/bootstrap/city_daemon/class_CityDaemonBootstrap +++ b/application/city/classes/filter/bootstrap/city_daemon/class_CityDaemonBootstrap @@ -61,6 +61,3 @@ class CityDaemonBootstrap???Filter extends BaseCityFilter implements Filterable $this->partialStub('Please implement this step.'); } } - -// [EOF] -?> diff --git a/application/city/classes/filter/bootstrap/city_daemon/class_CityDaemonBootstrapExtraBootstrappingFilter.php b/application/city/classes/filter/bootstrap/city_daemon/class_CityDaemonBootstrapExtraBootstrappingFilter.php index c603643..9e9e75e 100644 --- a/application/city/classes/filter/bootstrap/city_daemon/class_CityDaemonBootstrapExtraBootstrappingFilter.php +++ b/application/city/classes/filter/bootstrap/city_daemon/class_CityDaemonBootstrapExtraBootstrappingFilter.php @@ -61,6 +61,3 @@ class CityDaemonBootstrapExtraBootstrappingFilter extends BaseCityFilter impleme $cityInstance->doBootstrapping(); } } - -// [EOF] -?> diff --git a/application/city/classes/filter/bootstrap/class_CityDaemonBootstrap b/application/city/classes/filter/bootstrap/class_CityDaemonBootstrap index cb0afca..54246ae 100644 --- a/application/city/classes/filter/bootstrap/class_CityDaemonBootstrap +++ b/application/city/classes/filter/bootstrap/class_CityDaemonBootstrap @@ -62,6 +62,3 @@ class CityDaemonBootstrap???Filter extends BaseCityFilter implements Filterable $this->partialStub('Please implement this step.'); } } - -// [EOF] -?> diff --git a/application/city/classes/filter/bootstrap/init/class_CityDaemonBootstrapInitDaemonFilter.php b/application/city/classes/filter/bootstrap/init/class_CityDaemonBootstrapInitDaemonFilter.php index 7a573f8..2b5edb6 100644 --- a/application/city/classes/filter/bootstrap/init/class_CityDaemonBootstrapInitDaemonFilter.php +++ b/application/city/classes/filter/bootstrap/init/class_CityDaemonBootstrapInitDaemonFilter.php @@ -61,6 +61,3 @@ class CityDaemonBootstrapInitDaemonFilter extends BaseCityFilter implements Filt $cityInstance->bootstrapInitCityDaemon(); } } - -// [EOF] -?> diff --git a/application/city/classes/filter/city_daemon/class_CityDaemon b/application/city/classes/filter/city_daemon/class_CityDaemon index 6a1f54a..9cde6ee 100644 --- a/application/city/classes/filter/city_daemon/class_CityDaemon +++ b/application/city/classes/filter/city_daemon/class_CityDaemon @@ -58,6 +58,3 @@ class CityDaemon???Filter extends BaseCityFilter implements Filterable { $this->partialStub('Please implement this method.'); } } - -// [EOF] -?> diff --git a/application/city/classes/filter/city_daemon/class_CityDaemonInitializationFilter.php b/application/city/classes/filter/city_daemon/class_CityDaemonInitializationFilter.php index 86517cf..acef318 100644 --- a/application/city/classes/filter/city_daemon/class_CityDaemonInitializationFilter.php +++ b/application/city/classes/filter/city_daemon/class_CityDaemonInitializationFilter.php @@ -67,6 +67,3 @@ class CityDaemonInitializationFilter extends BaseCityFilter implements Filterabl /* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CITY-INIT-FILTER[' . __METHOD__ . ':' . __LINE__ . ']: City daemon has been added to registry.'); } } - -// [EOF] -?> diff --git a/application/city/classes/filter/city_daemon/class_CityDaemonPhpRequirementsFilter.php b/application/city/classes/filter/city_daemon/class_CityDaemonPhpRequirementsFilter.php index a215e82..8ec734f 100644 --- a/application/city/classes/filter/city_daemon/class_CityDaemonPhpRequirementsFilter.php +++ b/application/city/classes/filter/city_daemon/class_CityDaemonPhpRequirementsFilter.php @@ -66,6 +66,3 @@ class CityDaemonPhpRequirementsFilter extends BaseCityFilter implements Filterab } // END - if } } - -// [EOF] -?> diff --git a/application/city/classes/filter/city_daemon/class_CityDaemonWelcomeTeaserFilter.php b/application/city/classes/filter/city_daemon/class_CityDaemonWelcomeTeaserFilter.php index 3daa519..952df5c 100644 --- a/application/city/classes/filter/city_daemon/class_CityDaemonWelcomeTeaserFilter.php +++ b/application/city/classes/filter/city_daemon/class_CityDaemonWelcomeTeaserFilter.php @@ -62,6 +62,3 @@ class CityDaemonWelcomeTeaserFilter extends BaseCityFilter implements Filterable $cityInstance->outputConsoleTeaser(); } } - -// [EOF] -?> diff --git a/application/city/classes/filter/class_ b/application/city/classes/filter/class_ index b2e975d..88871ee 100644 --- a/application/city/classes/filter/class_ +++ b/application/city/classes/filter/class_ @@ -62,6 +62,3 @@ class City!!!???Filter extends BaseCityFilter implements Filterable { $this->partialStub('Please implement this step.'); } } - -// [EOF] -?> diff --git a/application/city/classes/filter/class_BaseCityFilter.php b/application/city/classes/filter/class_BaseCityFilter.php index a16e68a..8f36956 100644 --- a/application/city/classes/filter/class_BaseCityFilter.php +++ b/application/city/classes/filter/class_BaseCityFilter.php @@ -106,6 +106,3 @@ class BaseCityFilter extends BaseFilter { $packageInstance->getStackInstance()->pushNamed(NetworkPackage::STACKER_NAME_PROCESSED_MESSAGE, $messageArray); } } - -// [EOF] -?> diff --git a/application/city/classes/filter/shutdown/city/class_CityDaemonShutdown b/application/city/classes/filter/shutdown/city/class_CityDaemonShutdown index 8fcbc8d..f1b246d 100644 --- a/application/city/classes/filter/shutdown/city/class_CityDaemonShutdown +++ b/application/city/classes/filter/shutdown/city/class_CityDaemonShutdown @@ -62,6 +62,3 @@ class CityDaemonShutdown???Filter extends BaseCityFilter implements Filterable { $this->partialStub('Please implement this step.'); } } - -// [EOF] -?> diff --git a/application/city/classes/filter/shutdown/city/class_CityDaemonShutdownCityFilter.php b/application/city/classes/filter/shutdown/city/class_CityDaemonShutdownCityFilter.php index a8f89fa..ecca166 100644 --- a/application/city/classes/filter/shutdown/city/class_CityDaemonShutdownCityFilter.php +++ b/application/city/classes/filter/shutdown/city/class_CityDaemonShutdownCityFilter.php @@ -63,6 +63,3 @@ class CityDaemonShutdownCityFilter extends BaseCityFilter implements Filterable $cityInstance->doShutdown(); } } - -// [EOF] -?> diff --git a/application/city/classes/filter/shutdown/city/class_CityDaemonShutdownTaskHandlerFilter.php b/application/city/classes/filter/shutdown/city/class_CityDaemonShutdownTaskHandlerFilter.php index d557085..03b4671 100644 --- a/application/city/classes/filter/shutdown/city/class_CityDaemonShutdownTaskHandlerFilter.php +++ b/application/city/classes/filter/shutdown/city/class_CityDaemonShutdownTaskHandlerFilter.php @@ -62,6 +62,3 @@ class CityDaemonShutdownTaskHandlerFilter extends BaseCityFilter implements Filt $handlerInstance->doShutdown(); } } - -// [EOF] -?> diff --git a/application/city/classes/filter/task/city_daemon/class_CityDaemonTaskHandlerInitializerFilter.php b/application/city/classes/filter/task/city_daemon/class_CityDaemonTaskHandlerInitializerFilter.php index 1175ae8..ce13fe5 100644 --- a/application/city/classes/filter/task/city_daemon/class_CityDaemonTaskHandlerInitializerFilter.php +++ b/application/city/classes/filter/task/city_daemon/class_CityDaemonTaskHandlerInitializerFilter.php @@ -88,6 +88,3 @@ class CityDaemonTaskHandlerInitializerFilter extends BaseCityFilter implements F $cityInstance->addExtraTasks($handlerInstance); } } - -// [EOF] -?> diff --git a/application/city/classes/filter/verifier/class_CityNameVerifierFilter.php b/application/city/classes/filter/verifier/class_CityNameVerifierFilter.php index f8c3fa5..fc76097 100644 --- a/application/city/classes/filter/verifier/class_CityNameVerifierFilter.php +++ b/application/city/classes/filter/verifier/class_CityNameVerifierFilter.php @@ -110,6 +110,3 @@ class CityNameVerifierFilter extends BaseFilter implements Filterable { return $alreadyTaken; } } - -// [EOF] -?> diff --git a/application/city/classes/login/class_CityGuestLogin.php b/application/city/classes/login/class_CityGuestLogin.php index b29428d..11a938f 100644 --- a/application/city/classes/login/class_CityGuestLogin.php +++ b/application/city/classes/login/class_CityGuestLogin.php @@ -135,6 +135,3 @@ class CityGuestLogin extends BaseFrameworkSystem implements LoginableUser, Regis } // END - if } } - -// [EOF] -?> diff --git a/application/city/classes/login/class_CityUserLogin.php b/application/city/classes/login/class_CityUserLogin.php index 5c34e24..a0bf3b7 100644 --- a/application/city/classes/login/class_CityUserLogin.php +++ b/application/city/classes/login/class_CityUserLogin.php @@ -143,6 +143,3 @@ class CityUserLogin extends BaseFrameworkSystem implements LoginableUser, Regist } // END - if } } - -// [EOF] -?> diff --git a/application/city/classes/manager/city/class_CityManager.php b/application/city/classes/manager/city/class_CityManager.php index 8510cde..0eb6060 100644 --- a/application/city/classes/manager/city/class_CityManager.php +++ b/application/city/classes/manager/city/class_CityManager.php @@ -125,6 +125,3 @@ class CityManager extends BaseManager implements ManageableCity { $this->partialStub('Please implement this method.'); } } - -// [EOF] -?> diff --git a/application/city/classes/manager/city_entities/districts/class_CityDistrictsManager.php b/application/city/classes/manager/city_entities/districts/class_CityDistrictsManager.php index 1d90782..b2bc775 100644 --- a/application/city/classes/manager/city_entities/districts/class_CityDistrictsManager.php +++ b/application/city/classes/manager/city_entities/districts/class_CityDistrictsManager.php @@ -51,6 +51,3 @@ class CityDistrictsManager extends BaseFrameworkSystem implements ManageableCity return $managerInstance; } } - -// [EOF] -?> diff --git a/application/city/classes/manager/city_entities/lots/class_CityLotsManager.php b/application/city/classes/manager/city_entities/lots/class_CityLotsManager.php index 5a4631f..d158558 100644 --- a/application/city/classes/manager/city_entities/lots/class_CityLotsManager.php +++ b/application/city/classes/manager/city_entities/lots/class_CityLotsManager.php @@ -51,6 +51,3 @@ class CityLotsManager extends BaseFrameworkSystem implements ManageableCityLots, return $managerInstance; } } - -// [EOF] -?> diff --git a/application/city/classes/manager/city_entities/sections/class_CitySectionsManager.php b/application/city/classes/manager/city_entities/sections/class_CitySectionsManager.php index 28ddae2..6e54096 100644 --- a/application/city/classes/manager/city_entities/sections/class_CitySectionsManager.php +++ b/application/city/classes/manager/city_entities/sections/class_CitySectionsManager.php @@ -97,6 +97,3 @@ class CitySectionsManager extends BaseFrameworkSystem implements ManageableCityS } // END - foreach } } - -// [EOF] -?> diff --git a/application/city/classes/manager/class_ b/application/city/classes/manager/class_ index 42511ac..b8c291d 100644 --- a/application/city/classes/manager/class_ +++ b/application/city/classes/manager/class_ @@ -45,6 +45,3 @@ class ???Manager extends BaseFrameworkSystem implements Manageable???, Registera return $managerInstance; } } - -// [EOF] -?> diff --git a/application/city/classes/manager/class_BaseManager.php b/application/city/classes/manager/class_BaseManager.php index 50cfdd9..1f281bc 100644 --- a/application/city/classes/manager/class_BaseManager.php +++ b/application/city/classes/manager/class_BaseManager.php @@ -33,6 +33,3 @@ class BaseManager extends BaseCitySystem implements Manageable, Registerable { parent::__construct($className); } } - -// [EOF] -?> diff --git a/application/city/classes/manager/game/class_GameManager.php b/application/city/classes/manager/game/class_GameManager.php index 7e109cd..6fa4849 100644 --- a/application/city/classes/manager/game/class_GameManager.php +++ b/application/city/classes/manager/game/class_GameManager.php @@ -105,6 +105,3 @@ class RegionManager extends BaseManager implements ManageableRegion { return $resultInstance; } } - -// [EOF] -?> diff --git a/application/city/classes/manager/region/class_RegionManager.php b/application/city/classes/manager/region/class_RegionManager.php index 9f30bc2..76e4a87 100644 --- a/application/city/classes/manager/region/class_RegionManager.php +++ b/application/city/classes/manager/region/class_RegionManager.php @@ -105,6 +105,3 @@ class RegionManager extends BaseManager implements ManageableRegion { return $resultInstance; } } - -// [EOF] -?> diff --git a/application/city/classes/manager/region/class_RegionMapManager.php b/application/city/classes/manager/region/class_RegionMapManager.php index 98deeb4..98817f2 100644 --- a/application/city/classes/manager/region/class_RegionMapManager.php +++ b/application/city/classes/manager/region/class_RegionMapManager.php @@ -62,6 +62,3 @@ class RegionMapManager extends BaseManager implements ManageableRegionMap { die('!ok'); } } - -// [EOF] -?> diff --git a/application/city/classes/menu/class_City b/application/city/classes/menu/class_City index e6966dd..84450b4 100644 --- a/application/city/classes/menu/class_City +++ b/application/city/classes/menu/class_City @@ -45,6 +45,3 @@ class City???Menu extends BaseMenu implements RenderableMenu { return $menuInstance; } } - -// [EOF] -?> diff --git a/application/city/classes/menu/class_CityConfirmMenu.php b/application/city/classes/menu/class_CityConfirmMenu.php index f6bf7b8..3a02036 100644 --- a/application/city/classes/menu/class_CityConfirmMenu.php +++ b/application/city/classes/menu/class_CityConfirmMenu.php @@ -45,6 +45,3 @@ class CityConfirmMenu extends BaseMenu implements RenderableMenu { return $menuInstance; } } - -// [EOF] -?> diff --git a/application/city/classes/menu/class_CityHomeMenu.php b/application/city/classes/menu/class_CityHomeMenu.php index b1975ad..1e0b943 100644 --- a/application/city/classes/menu/class_CityHomeMenu.php +++ b/application/city/classes/menu/class_CityHomeMenu.php @@ -45,6 +45,3 @@ class CityHomeMenu extends BaseMenu implements RenderableMenu { return $menuInstance; } } - -// [EOF] -?> diff --git a/application/city/classes/menu/class_CityLoginAreaMenu.php b/application/city/classes/menu/class_CityLoginAreaMenu.php index b5d5068..52a5903 100644 --- a/application/city/classes/menu/class_CityLoginAreaMenu.php +++ b/application/city/classes/menu/class_CityLoginAreaMenu.php @@ -45,6 +45,3 @@ class CityLoginAreaMenu extends BaseMenu implements RenderableMenu { return $menuInstance; } } - -// [EOF] -?> diff --git a/application/city/classes/menu/class_CityLoginFailedMenu.php b/application/city/classes/menu/class_CityLoginFailedMenu.php index 228bcc0..25125fc 100644 --- a/application/city/classes/menu/class_CityLoginFailedMenu.php +++ b/application/city/classes/menu/class_CityLoginFailedMenu.php @@ -45,6 +45,3 @@ class CityLoginFailedMenu extends BaseMenu implements RenderableMenu { return $menuInstance; } } - -// [EOF] -?> diff --git a/application/city/classes/menu/class_CityLoginMenu.php b/application/city/classes/menu/class_CityLoginMenu.php index d9e8c2a..e2be32c 100644 --- a/application/city/classes/menu/class_CityLoginMenu.php +++ b/application/city/classes/menu/class_CityLoginMenu.php @@ -45,6 +45,3 @@ class CityLoginMenu extends BaseMenu implements RenderableMenu { return $menuInstance; } } - -// [EOF] -?> diff --git a/application/city/classes/menu/class_CityLogoutMenu.php b/application/city/classes/menu/class_CityLogoutMenu.php index 9ec8861..7d3e85e 100644 --- a/application/city/classes/menu/class_CityLogoutMenu.php +++ b/application/city/classes/menu/class_CityLogoutMenu.php @@ -45,6 +45,3 @@ class CityLogoutMenu extends BaseMenu implements RenderableMenu { return $menuInstance; } } - -// [EOF] -?> diff --git a/application/city/classes/menu/class_CityRegisterMenu.php b/application/city/classes/menu/class_CityRegisterMenu.php index 50bb576..a1182ce 100644 --- a/application/city/classes/menu/class_CityRegisterMenu.php +++ b/application/city/classes/menu/class_CityRegisterMenu.php @@ -45,6 +45,3 @@ class CityRegisterMenu extends BaseMenu implements RenderableMenu { return $menuInstance; } } - -// [EOF] -?> diff --git a/application/city/classes/menu/class_CityStatusMenu.php b/application/city/classes/menu/class_CityStatusMenu.php index 2a56211..06d04b2 100644 --- a/application/city/classes/menu/class_CityStatusMenu.php +++ b/application/city/classes/menu/class_CityStatusMenu.php @@ -45,6 +45,3 @@ class CityStatusMenu extends BaseMenu implements RenderableMenu { return $menuInstance; } } - -// [EOF] -?> diff --git a/application/city/classes/menu/government/class_CityGovernmentFailedAreaMenu.php b/application/city/classes/menu/government/class_CityGovernmentFailedAreaMenu.php index 4cbbe01..d52f478 100644 --- a/application/city/classes/menu/government/class_CityGovernmentFailedAreaMenu.php +++ b/application/city/classes/menu/government/class_CityGovernmentFailedAreaMenu.php @@ -45,6 +45,3 @@ class CityGovernmentFailedAreaMenu extends BaseMenu implements RenderableMenu { return $menuInstance; } } - -// [EOF] -?> diff --git a/application/city/classes/resolver/command/console/class_CityConsoleCommandResolver.php b/application/city/classes/resolver/command/console/class_CityConsoleCommandResolver.php index b642646..4f17a7b 100644 --- a/application/city/classes/resolver/command/console/class_CityConsoleCommandResolver.php +++ b/application/city/classes/resolver/command/console/class_CityConsoleCommandResolver.php @@ -64,6 +64,3 @@ class CityConsoleCommandResolver extends BaseCommandResolver implements CommandR return $resolverInstance; } } - -// [EOF] -?> diff --git a/application/city/classes/resolver/command/html/class_CityHtmlCommandResolver.php b/application/city/classes/resolver/command/html/class_CityHtmlCommandResolver.php index f19b6c7..ea492be 100644 --- a/application/city/classes/resolver/command/html/class_CityHtmlCommandResolver.php +++ b/application/city/classes/resolver/command/html/class_CityHtmlCommandResolver.php @@ -64,6 +64,3 @@ class CityHtmlCommandResolver extends BaseCommandResolver implements CommandReso return $resolverInstance; } } - -// [EOF] -?> diff --git a/application/city/classes/resolver/controller/console/class_CityConsoleControllerResolver.php b/application/city/classes/resolver/controller/console/class_CityConsoleControllerResolver.php index 544a1e4..a4b6d8a 100644 --- a/application/city/classes/resolver/controller/console/class_CityConsoleControllerResolver.php +++ b/application/city/classes/resolver/controller/console/class_CityConsoleControllerResolver.php @@ -67,6 +67,3 @@ class CityConsoleControllerResolver extends BaseControllerResolver implements Co return $resolverInstance; } } - -// [EOF] -?> diff --git a/application/city/classes/resolver/controller/html/class_CityHtmlControllerResolver.php b/application/city/classes/resolver/controller/html/class_CityHtmlControllerResolver.php index 06fc241..45168d7 100644 --- a/application/city/classes/resolver/controller/html/class_CityHtmlControllerResolver.php +++ b/application/city/classes/resolver/controller/html/class_CityHtmlControllerResolver.php @@ -67,6 +67,3 @@ class CityHtmlControllerResolver extends BaseControllerResolver implements Contr return $resolverInstance; } } - -// [EOF] -?> diff --git a/application/city/classes/resolver/controller/image/class_CityImageControllerResolver.php b/application/city/classes/resolver/controller/image/class_CityImageControllerResolver.php index e837d97..de17cf3 100644 --- a/application/city/classes/resolver/controller/image/class_CityImageControllerResolver.php +++ b/application/city/classes/resolver/controller/image/class_CityImageControllerResolver.php @@ -67,6 +67,3 @@ class CityImageControllerResolver extends BaseControllerResolver implements Cont return $resolverInstance; } } - -// [EOF] -?> diff --git a/application/city/classes/states/city/active/class_CityActiveState.php b/application/city/classes/states/city/active/class_CityActiveState.php index 520e031..bb3473a 100644 --- a/application/city/classes/states/city/active/class_CityActiveState.php +++ b/application/city/classes/states/city/active/class_CityActiveState.php @@ -51,6 +51,3 @@ class CityActiveState extends BaseCityState implements Stateable { return $stateInstance; } } - -// [EOF] -?> diff --git a/application/city/classes/states/city/class_ b/application/city/classes/states/city/class_ index 6051e65..a81ff34 100644 --- a/application/city/classes/states/city/class_ +++ b/application/city/classes/states/city/class_ @@ -48,6 +48,3 @@ class City???State extends BaseCityState implements Stateable { return $stateInstance; } } - -// [EOF] -?> diff --git a/application/city/classes/states/city/class_BaseCityState.php b/application/city/classes/states/city/class_BaseCityState.php index 14d707c..56e57cb 100644 --- a/application/city/classes/states/city/class_BaseCityState.php +++ b/application/city/classes/states/city/class_BaseCityState.php @@ -63,6 +63,3 @@ class BaseCityState extends BaseState { } // END - if } } - -// [EOF] -?> diff --git a/application/city/classes/states/city/init/class_CityInitState.php b/application/city/classes/states/city/init/class_CityInitState.php index 77b4737..32ec04b 100644 --- a/application/city/classes/states/city/init/class_CityInitState.php +++ b/application/city/classes/states/city/init/class_CityInitState.php @@ -70,6 +70,3 @@ class CityInitState extends BaseCityState implements Stateable { CityStateFactory::createCityStateInstanceByName('active'); } } - -// [EOF] -?> diff --git a/application/city/classes/tasks/class_BaseCityTask.php b/application/city/classes/tasks/class_BaseCityTask.php index f4343d2..92550f6 100644 --- a/application/city/classes/tasks/class_BaseCityTask.php +++ b/application/city/classes/tasks/class_BaseCityTask.php @@ -57,6 +57,3 @@ class BaseCityTask extends BaseTask { $this->cityInstance = $cityInstance; } } - -// [EOF] -?> diff --git a/application/city/classes/tasks/daemon/building/class_CityDaemonBuildingGrowthTask.php b/application/city/classes/tasks/daemon/building/class_CityDaemonBuildingGrowthTask.php index 5f14806..b536f75 100644 --- a/application/city/classes/tasks/daemon/building/class_CityDaemonBuildingGrowthTask.php +++ b/application/city/classes/tasks/daemon/building/class_CityDaemonBuildingGrowthTask.php @@ -90,6 +90,3 @@ class CityDaemonBuildingGrowthTask extends BaseCityTask implements Taskable, Vis self::createDebugInstance(__CLASS__)->debugOutput('TASK[' . __METHOD__ . ':' . __LINE__ . ']: Shutting down...'); } } - -// [EOF] -?> diff --git a/application/city/classes/tasks/daemon/class_CityDaemon b/application/city/classes/tasks/daemon/class_CityDaemon index b0984b9..a230088 100644 --- a/application/city/classes/tasks/daemon/class_CityDaemon +++ b/application/city/classes/tasks/daemon/class_CityDaemon @@ -77,6 +77,3 @@ class CityDaemon???Task extends BaseTask implements Taskable, Visitable { self::createDebugInstance(__CLASS__)->debugOutput('TASK[' . __METHOD__ . ':' . __LINE__ . ']: Shutting down...'); } } - -// [EOF] -?> diff --git a/application/city/classes/tasks/daemon/household/class_CityDaemonHouseholdGrowthTask.php b/application/city/classes/tasks/daemon/household/class_CityDaemonHouseholdGrowthTask.php index 2e017f1..5b749ca 100644 --- a/application/city/classes/tasks/daemon/household/class_CityDaemonHouseholdGrowthTask.php +++ b/application/city/classes/tasks/daemon/household/class_CityDaemonHouseholdGrowthTask.php @@ -90,6 +90,3 @@ class CityDaemonHouseholdGrowthTask extends BaseCityTask implements Taskable, Vi self::createDebugInstance(__CLASS__)->debugOutput('TASK[' . __METHOD__ . ':' . __LINE__ . ']: Shutting down...'); } } - -// [EOF] -?> diff --git a/application/city/classes/tasks/daemon/map_expander/class_CityDaemonMapExpanderTask.php b/application/city/classes/tasks/daemon/map_expander/class_CityDaemonMapExpanderTask.php index ef4d6a1..fa7db40 100644 --- a/application/city/classes/tasks/daemon/map_expander/class_CityDaemonMapExpanderTask.php +++ b/application/city/classes/tasks/daemon/map_expander/class_CityDaemonMapExpanderTask.php @@ -90,6 +90,3 @@ class CityDaemonMapExpanderTask extends BaseCityTask implements Taskable, Visita self::createDebugInstance(__CLASS__)->debugOutput('TASK[' . __METHOD__ . ':' . __LINE__ . ']: Shutting down...'); } } - -// [EOF] -?> diff --git a/application/city/config-local.php-dist b/application/city/config-local.php-dist index 0d40693..ac4c73c 100644 --- a/application/city/config-local.php-dist +++ b/application/city/config-local.php-dist @@ -29,6 +29,3 @@ $cfg = FrameworkConfiguration::getSelfInstance(); // CFG: CITY-FOO $cfg->setConfigEntry('city_foo', 'foo'); - -// [EOF] -?> diff --git a/application/city/config.php b/application/city/config.php index c07d84a..234f055 100644 --- a/application/city/config.php +++ b/application/city/config.php @@ -1,4 +1,7 @@ setConfigEntry('city_max_initial_up_expansion', 5); // CFG: CITY-MAX-INITIAL-DOWN-EXPANSION $cfg->setConfigEntry('city_max_initial_down_expansion', 3); - -// [EOF] -?> diff --git a/application/city/data.php b/application/city/data.php index bdfe879..7d6dcee 100644 --- a/application/city/data.php +++ b/application/city/data.php @@ -1,43 +1,2 @@ - * @version 0.0.0 - * @copyright Copyright (c) 2015, 2016 City Developer Team - * @license GNU GPL 3.0 or any newer version - * @link http://www.shipsimu.org - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -// Get config instance -$cfg = FrameworkConfiguration::getSelfInstance(); - -// Get an instance of the helper -$app = call_user_func_array( - array($cfg->getConfigEntry('app_helper_class'), 'getSelfInstance'), - array() -); - -// Set application name and version -$app->setAppName('Simple City Growth Simulation'); -$app->setAppVersion('0.0.0'); -$app->setAppShortName('city'); - -// [EOF] -?> +// @DEPRECATED diff --git a/application/city/debug.php b/application/city/debug.php index 2b78507..76a1339 100644 --- a/application/city/debug.php +++ b/application/city/debug.php @@ -23,6 +23,3 @@ // Set error reporting error_reporting(E_ALL | E_STRICT); - -// [EOF] -?> diff --git a/application/city/exceptions.php b/application/city/exceptions.php index a3d54a0..3538bd3 100644 --- a/application/city/exceptions.php +++ b/application/city/exceptions.php @@ -1,10 +1,14 @@ - * @version 0.0 - * @copyright Copyright (c) 2015, 2016 City Developer Team + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team * @license GNU GPL 3.0 or any newer version * * This program is free software: you can redistribute it and/or modify @@ -22,9 +26,9 @@ */ // The node's own exception handler -function city_exception_handler ($exceptionInstance) { +function tests_exception_handler ($exceptionInstance) { // Is it an object and a valid instance? - if ((is_object($exceptionInstance)) && ($exceptionInstance instanceof FrameworkException)) { + if ((is_object($exceptionInstance)) && ($exceptionInstance instanceof Exception)) { // Init variable $backTrace = ''; @@ -73,9 +77,9 @@ Backtrace: -------------------------------------------------------------------------------- %s --------------------------------------------------------------------------------\n", - trim(html_entity_decode(strip_tags($exceptionInstance->__toString()))), + trim(html_entity_decode(strip_tags(get_class($exceptionInstance)))), trim(html_entity_decode(strip_tags($exceptionInstance->getMessage()))), - $exceptionInstance->getHexCode(), + ($exceptionInstance instanceof FrameworkException ? $exceptionInstance->getHexCode() : '0x' . bin2hex($exceptionInstance->getCode())), $exceptionInstance->getFile(), $exceptionInstance->getLine(), trim($backTrace) @@ -83,16 +87,21 @@ Backtrace: // Output the message print($message); + } elseif (is_object($exceptionInstance)) { + // Output more details + printf('exceptionInstance=%s', print_r($exceptionInstance, true)); } else { - // Invalid exception instance detected! Do *only* throw exceptions that - // extends our own exception 'FrameworkException' to get such nice - // outputs like above. - print('exceptionInstance[]=' . gettype($exceptionInstance) . ' is invalid! Please inform the City developer team.'); + /* + * Invalid exception instance detected! Do *only* throw exceptions that + * extends our own exception 'FrameworkException' to get such nice + * outputs like above. + */ + printf('exceptionInstance[]=%s is invalid! Please inform the core developer team.' . PHP_EOL, gettype($exceptionInstance)); } } // Error handler -function __errorHandler ($errno, $errstr, $errfile, $errline, array $errcontext) { +function tests_error_handler ($errno, $errstr, $errfile, $errline, array $errcontext) { // Construct the message $message = sprintf('File: %s, Line: %s, Code: %s, Message: %s', basename($errfile), @@ -106,7 +115,7 @@ function __errorHandler ($errno, $errstr, $errfile, $errline, array $errcontext) } // END - function // Assertion handler -function __assertHandler ($file, $line, $code) { +function tests_assert_handler ($file, $line, $code) { // Empty code? if ($code === '') { $code = 'Unknown'; @@ -120,7 +129,6 @@ function __assertHandler ($file, $line, $code) { ); // Log assert - die('message='.$message); syslog(LOG_WARNING, $message); // Throw an exception here @@ -128,17 +136,14 @@ function __assertHandler ($file, $line, $code) { } // END - function // Set error handler -//set_error_handler('__errorHandler'); +//set_error_handler('tests_error_handler'); // Set the new handler -set_exception_handler('city_exception_handler'); +set_exception_handler('tests_exception_handler'); // Init assert handling -assert_options(ASSERT_ACTIVE , TRUE); -assert_options(ASSERT_WARNING , FALSE); -assert_options(ASSERT_BAIL , TRUE); -assert_options(ASSERT_QUIET_EVAL, FALSE); -assert_options(ASSERT_CALLBACK , '__assertHandler'); - -// [EOF] -?> +assert_options(ASSERT_ACTIVE , true); +assert_options(ASSERT_WARNING , false); +assert_options(ASSERT_BAIL , true); +assert_options(ASSERT_QUIET_EVAL, false); +assert_options(ASSERT_CALLBACK , 'tests_assert_handler'); diff --git a/application/city/init.php b/application/city/init.php index f6b588e..7d6dcee 100644 --- a/application/city/init.php +++ b/application/city/init.php @@ -1,38 +1,2 @@ - * @version 0.0 - * @copyright Copyright (c) 2015, 2016 City Developer Team - * @license GNU GPL 3.0 or any newer version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -// Get config instance -$cfg = FrameworkConfiguration::getSelfInstance(); - -// Initialize output system, you can use any class that expands BaseFrameworkSystem -ApplicationHelper::createDebugInstance('ApplicationHelper'); - -// This application needs a database connection then we have to simply include -// the inc/database.php script -require($cfg->getConfigEntry('base_path') . 'inc/database.php'); - -// [EOF] -?> +// @DEPRECATED diff --git a/application/city/interfaces/database/frontend/city/class_CityInformationWrapper.php b/application/city/interfaces/database/frontend/city/class_CityInformationWrapper.php index 349458c..75c3d2e 100644 --- a/application/city/interfaces/database/frontend/city/class_CityInformationWrapper.php +++ b/application/city/interfaces/database/frontend/city/class_CityInformationWrapper.php @@ -78,6 +78,3 @@ interface CityInformationWrapper extends DatabaseWrapper { */ function getAllCityIds (); } - -// [EOF] -?> diff --git a/application/city/interfaces/database/frontend/city_entities/districts/class_CityDistrictsWrapper.php b/application/city/interfaces/database/frontend/city_entities/districts/class_CityDistrictsWrapper.php index 3f0b41e..9852f2f 100644 --- a/application/city/interfaces/database/frontend/city_entities/districts/class_CityDistrictsWrapper.php +++ b/application/city/interfaces/database/frontend/city_entities/districts/class_CityDistrictsWrapper.php @@ -30,6 +30,3 @@ interface CityDistrictsWrapper extends DatabaseWrapper { */ function ifCityHasDistricts ($cityId); } - -// [EOF] -?> diff --git a/application/city/interfaces/database/frontend/city_entities/lots/class_CityLotsWrapper.php b/application/city/interfaces/database/frontend/city_entities/lots/class_CityLotsWrapper.php index 652ccfc..a053c7e 100644 --- a/application/city/interfaces/database/frontend/city_entities/lots/class_CityLotsWrapper.php +++ b/application/city/interfaces/database/frontend/city_entities/lots/class_CityLotsWrapper.php @@ -30,6 +30,3 @@ interface CityLotsWrapper extends DatabaseWrapper { */ function ifCityHasLots ($cityId); } - -// [EOF] -?> diff --git a/application/city/interfaces/database/frontend/city_entities/sections/class_CitySectionsWrapper.php b/application/city/interfaces/database/frontend/city_entities/sections/class_CitySectionsWrapper.php index 9636cd2..1587515 100644 --- a/application/city/interfaces/database/frontend/city_entities/sections/class_CitySectionsWrapper.php +++ b/application/city/interfaces/database/frontend/city_entities/sections/class_CitySectionsWrapper.php @@ -39,6 +39,3 @@ interface CitySectionsWrapper extends DatabaseWrapper { */ function doInitialCityExpansion ($cityId); } - -// [EOF] -?> diff --git a/application/city/interfaces/database/frontend/game_options/class_CityGameOptionsWrapper.php b/application/city/interfaces/database/frontend/game_options/class_CityGameOptionsWrapper.php index f02197b..5be0164 100644 --- a/application/city/interfaces/database/frontend/game_options/class_CityGameOptionsWrapper.php +++ b/application/city/interfaces/database/frontend/game_options/class_CityGameOptionsWrapper.php @@ -23,6 +23,3 @@ */ interface CityGameOptionsWrapper extends DatabaseWrapper { } - -// [EOF] -?> diff --git a/application/city/interfaces/database/frontend/region/class_RegionInformationWrapper.php b/application/city/interfaces/database/frontend/region/class_RegionInformationWrapper.php index 494f7c7..f605e0d 100644 --- a/application/city/interfaces/database/frontend/region/class_RegionInformationWrapper.php +++ b/application/city/interfaces/database/frontend/region/class_RegionInformationWrapper.php @@ -53,6 +53,3 @@ interface RegionInformationWrapper extends DatabaseWrapper { */ function createRegionByName ($regionName); } - -// [EOF] -?> diff --git a/application/city/interfaces/database/frontend/region/class_RegionMapWrapper.php b/application/city/interfaces/database/frontend/region/class_RegionMapWrapper.php index 805f91d..99b8962 100644 --- a/application/city/interfaces/database/frontend/region/class_RegionMapWrapper.php +++ b/application/city/interfaces/database/frontend/region/class_RegionMapWrapper.php @@ -23,6 +23,3 @@ */ interface RegionMapWrapper extends DatabaseWrapper { } - -// [EOF] -?> diff --git a/application/city/interfaces/helper/city/class_CityHelper.php b/application/city/interfaces/helper/city/class_CityHelper.php index 76aecbc..c325639 100644 --- a/application/city/interfaces/helper/city/class_CityHelper.php +++ b/application/city/interfaces/helper/city/class_CityHelper.php @@ -85,6 +85,3 @@ interface CityHelper extends Helper, AddableCriteria { */ function isMapPendingExpansion (); } - -// [EOF] -?> diff --git a/application/city/interfaces/manager/city/class_ManageableCity.php b/application/city/interfaces/manager/city/class_ManageableCity.php index 60b5778..0055983 100644 --- a/application/city/interfaces/manager/city/class_ManageableCity.php +++ b/application/city/interfaces/manager/city/class_ManageableCity.php @@ -53,6 +53,3 @@ interface ManageableCity extends Manageable { */ function renderCityMap (HelpableTemplate $helperInstance); } - -// [EOF] -?> diff --git a/application/city/interfaces/manager/city_entities/class_ManageableCityEntities.php b/application/city/interfaces/manager/city_entities/class_ManageableCityEntities.php index 03f82a6..3d1908d 100644 --- a/application/city/interfaces/manager/city_entities/class_ManageableCityEntities.php +++ b/application/city/interfaces/manager/city_entities/class_ManageableCityEntities.php @@ -23,6 +23,3 @@ */ interface ManageableCityEntities extends Manageable { } - -// [EOF] -?> diff --git a/application/city/interfaces/manager/city_entities/districts/class_ManageableCityDistricts.php b/application/city/interfaces/manager/city_entities/districts/class_ManageableCityDistricts.php index b0d163c..b83a02f 100644 --- a/application/city/interfaces/manager/city_entities/districts/class_ManageableCityDistricts.php +++ b/application/city/interfaces/manager/city_entities/districts/class_ManageableCityDistricts.php @@ -23,6 +23,3 @@ */ interface ManageableCityDistricts extends ManageableCityEntities { } - -// [EOF] -?> diff --git a/application/city/interfaces/manager/city_entities/lots/class_ManageableCityLots.php b/application/city/interfaces/manager/city_entities/lots/class_ManageableCityLots.php index 6089ee2..8e7a7be 100644 --- a/application/city/interfaces/manager/city_entities/lots/class_ManageableCityLots.php +++ b/application/city/interfaces/manager/city_entities/lots/class_ManageableCityLots.php @@ -23,6 +23,3 @@ */ interface ManageableCityLots extends ManageableCityEntities { } - -// [EOF] -?> diff --git a/application/city/interfaces/manager/city_entities/sections/class_ManageableCitySections.php b/application/city/interfaces/manager/city_entities/sections/class_ManageableCitySections.php index 96ac934..a373f42 100644 --- a/application/city/interfaces/manager/city_entities/sections/class_ManageableCitySections.php +++ b/application/city/interfaces/manager/city_entities/sections/class_ManageableCitySections.php @@ -36,6 +36,3 @@ interface ManageableCitySections extends ManageableCityEntities { */ function expandMaps (); } - -// [EOF] -?> diff --git a/application/city/interfaces/manager/class_Manageable.php b/application/city/interfaces/manager/class_Manageable.php index 08adc56..48d9b59 100644 --- a/application/city/interfaces/manager/class_Manageable.php +++ b/application/city/interfaces/manager/class_Manageable.php @@ -23,6 +23,3 @@ */ interface Manageable extends FrameworkInterface { } - -// [EOF] -?> diff --git a/application/city/interfaces/manager/region/class_ManageableRegion.php b/application/city/interfaces/manager/region/class_ManageableRegion.php index 20fbb3f..ac173dd 100644 --- a/application/city/interfaces/manager/region/class_ManageableRegion.php +++ b/application/city/interfaces/manager/region/class_ManageableRegion.php @@ -44,6 +44,3 @@ interface ManageableRegion extends Manageable { */ function createFirstRegion (); } - -// [EOF] -?> diff --git a/application/city/interfaces/manager/region/class_ManageableRegionMap.php b/application/city/interfaces/manager/region/class_ManageableRegionMap.php index 39261a7..b46c0bb 100644 --- a/application/city/interfaces/manager/region/class_ManageableRegionMap.php +++ b/application/city/interfaces/manager/region/class_ManageableRegionMap.php @@ -31,6 +31,3 @@ interface ManageableRegionMap extends Manageable { */ function createRegionMapByResult (SearchableResult $resultInstance); } - -// [EOF] -?> diff --git a/application/city/loader.php b/application/city/loader.php index aa08c50..7d6dcee 100644 --- a/application/city/loader.php +++ b/application/city/loader.php @@ -1,28 +1,2 @@ - * @version 0.0 - * @copyright Copyright (c) 2015, 2016 City Developer Team - * @license GNU GPL 3.0 or any newer version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -// Scan for application's classes, exceptions and interfaces -ClassLoader::scanApplicationClasses(); - -// [EOF] -?> +// @DEPRECATED diff --git a/application/city/starter.php b/application/city/starter.php index 837d203..7d6dcee 100644 --- a/application/city/starter.php +++ b/application/city/starter.php @@ -1,57 +1,2 @@ - * @version 0.0.0 - * @copyright Copyright (c) 2015, 2016 City Developer Team - * @license GNU GPL 3.0 or any newer version - * @link http://www.shipsimu.org - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -// Is there an application helper instance? We need the method main() for -// maining the application -$app = call_user_func_array( - array( - FrameworkConfiguration::getSelfInstance()->getConfigEntry('app_helper_class'), 'getSelfInstance' - ), array() -); - -// Some sanity checks -if ((empty($app)) || (is_null($app))) { - // Something went wrong! - ApplicationEntryPoint::app_exit(sprintf('[Main:] The application %s could not be launched because the helper class %s is not loaded.', - $application, - FrameworkConfiguration::getSelfInstance()->getConfigEntry('app_helper_class') - )); -} elseif (!is_object($app)) { - // No object! - ApplicationEntryPoint::app_exit(sprintf('[Main:] The application %s could not be launched because 'app' is not an object.', - $application - )); -} elseif (!method_exists($app, FrameworkConfiguration::getSelfInstance()->getConfigEntry('entry_method'))) { - // Method not found! - ApplicationEntryPoint::app_exit(sprintf('[Main:] The application %s could not be launched because the method %s is missing.', - $application, - FrameworkConfiguration::getSelfInstance()->getConfigEntry('entry_method') - )); -} - -// Call user function -call_user_func_array(array($app, FrameworkConfiguration::getSelfInstance()->getConfigEntry('entry_method')), array()); - -// [EOF] -?> +// @DEPRECATED diff --git a/application/city/templates/image/code_captcha.img b/application/city/templates/image/code_captcha.img index 223e4fb..d74d547 100644 --- a/application/city/templates/image/code_captcha.img +++ b/application/city/templates/image/code_captcha.img @@ -73,6 +73,3 @@ $helper->flushContent(); // Comment this out if image is done //$this->debugInstance(); - -// [EOF] -?> diff --git a/application/city/templates/image/emergency_exit.img b/application/city/templates/image/emergency_exit.img index bf67aa7..a2f3de3 100644 --- a/application/city/templates/image/emergency_exit.img +++ b/application/city/templates/image/emergency_exit.img @@ -13,6 +13,3 @@ $helper->setHeight(50); // Comment this out if image is done $this->debugInstance(); - -// [EOF] -?> diff --git a/core b/core index 3136095..d3194bf 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 3136095b1d2e8c77eefd2eae23d99897ef586e56 +Subproject commit d3194bf4fa92124e55cfc596e50abca8e6303944 diff --git a/inc b/inc deleted file mode 120000 index 1f8dea2..0000000 --- a/inc +++ /dev/null @@ -1 +0,0 @@ -core/inc \ No newline at end of file diff --git a/index.php b/index.php index 74d021d..1e7f1d4 100644 --- a/index.php +++ b/index.php @@ -1,4 +1,19 @@ * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.shipsimu.org * @@ -28,9 +43,9 @@ */ final class ApplicationEntryPoint { /** - * Core path + * Framework path */ - private static $corePath = ''; + private static $frameworkPath = ''; /** * The application's emergency exit @@ -42,7 +57,7 @@ final class ApplicationEntryPoint { * @return void * @todo This method is old code and needs heavy rewrite and should be moved to ApplicationHelper */ - public static final function app_exit ($message = '', $code = FALSE, $extraData = '', $silentMode = FALSE) { + public static final function exitApplication ($message = '', $code = false, $extraData = '', $silentMode = false) { // Is this method already called? if (isset($GLOBALS['app_die_called'])) { // Then output the text directly @@ -50,7 +65,7 @@ final class ApplicationEntryPoint { } // END - if // This method shall not be called twice - $GLOBALS['app_die_called'] = TRUE; + $GLOBALS['app_die_called'] = true; // Is a message set? if (empty($message)) { @@ -59,23 +74,23 @@ final class ApplicationEntryPoint { } // END - if // Get config instance - $configInstance = FrameworkConfiguration::getSelfInstance(); + $configInstance = FrameworkBootstrap::getConfigurationInstance(); // Do we have debug installation? - if (($configInstance->getConfigEntry('product_install_mode') == 'productive') || ($silentMode === TRUE)) { + if (($configInstance->getConfigEntry('product_install_mode') == 'productive') || ($silentMode === true)) { // Abort here exit(); } // END - if // Get some instances - $tpl = FrameworkConfiguration::getSelfInstance()->getConfigEntry('html_template_class'); + $tpl = $configInstance->getConfigEntry('html_template_class'); $languageInstance = LanguageSystem::getSelfInstance(); // Initialize template instance here to avoid warnings in IDE $templateInstance = NULL; // Get response instance - $responseInstance = ApplicationHelper::getSelfInstance()->getResponseInstance(); + $responseInstance = FrameworkBootstrap::getResponseInstance(); // Is the template engine loaded? if ((class_exists($tpl)) && (is_object($languageInstance))) { @@ -84,7 +99,7 @@ final class ApplicationEntryPoint { // Get the template instance from our object factory $templateInstance = ObjectFactory::createObjectByName($tpl); } catch (FrameworkException $e) { - exit(sprintf("[Main:] Could not initialize template engine for reason: %s", + exit(sprintf('[Main:] Could not initialize template engine for reason: %s', $e->getMessage() )); } @@ -105,7 +120,7 @@ final class ApplicationEntryPoint { } // END - if // Add the traceback path to the final output - $backtrace .= sprintf("%s:%d, %s(%d)
\n", + $backtrace .= sprintf('%s:%d, %s(%d)
' . PHP_EOL, basename($trace['file']), $trace['line'], $trace['function'], @@ -117,7 +132,7 @@ final class ApplicationEntryPoint { $applicationInstance = NULL; // Is the class there? - if (class_exists('ApplicationHelper')) { + if (class_exists('Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper')) { // Get application instance $applicationInstance = ApplicationHelper::getSelfInstance(); @@ -150,7 +165,7 @@ final class ApplicationEntryPoint { // Flush the response $responseInstance->flushBuffer(); - } catch (FileIoException $e) { + } catch (FileNotFoundException $e) { // Even the template 'emergency_exit' wasn't found so output both message exit($message . ', exception: ' . $e->getMessage()); } @@ -166,52 +181,106 @@ final class ApplicationEntryPoint { } /** - * Determines the correct absolute path for all includes only once per run. - * Other calls of this method are being "cached". + * Determines the correct absolute path for the framework. A set of common + * paths is being tested (first most common for applications, second when + * core tests are being executed and third/forth if the framework has been + * cloned there). * - * @return $corePath Base path (core) for all includes + * @return $frameworkPath Path for framework */ - protected static final function detectCorePath () { + public static final function detectFrameworkPath () { // Is it not set? - if (empty(self::$corePath)) { - // Auto-detect our core path - self::$corePath = str_replace("\\", '/', dirname(__FILE__)); + if (empty(self::$frameworkPath)) { + // Auto-detect core path (first application-common) + foreach (array('core', __DIR__, '/usr/local/share/php/core', '/usr/share/php/core') as $possiblePath) { + // Create full path for testing + $realPath = realpath($possiblePath); + + // Debug message + //* NOISY-DEBUG: */ printf('[%s:%d]: realPath[%s]=%s' . PHP_EOL, __METHOD__, __LINE__, gettype($realPath), $realPath); + + // Is it false? + if ($realPath === false) { + // Then, not found. + continue; + } // END - if + + // Append framework path + $frameworkPath = sprintf('%s%sframework%s', $realPath, DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR); + + // First create full-qualified file name (FQFN) to framework/config-global.php + $configFile = $frameworkPath . 'config-global.php'; + + // Debug message + //* NOISY-DEBUG: */ printf('[%s:%d]: configFile=%s' . PHP_EOL, __METHOD__, __LINE__, $configFile); + + // Is it readable? + if (is_readable($configFile)) { + // Found one + self::$frameworkPath = $frameworkPath; + + // Abort here + break; + } // END - if + } // END - foreach + + // Able to find? + if (!is_dir(self::$frameworkPath)) { + // Is no directory + throw new Exception('Cannot find framework.'); + } // END - if } // END - if // Return it - return self::$corePath; + return self::$frameworkPath; } /** - * The application's main entry point. This class isolates some local + * Getter for root path + * + * @return $rootPath Root path + */ + public static function getRootPath () { + // Get __DIR__, really simple and no detection + return __DIR__; + } + + /** + * The framework's main entry point. This class isolates some local * variables which shall not become visible to outside because of security - * concerns. We are doing this here to "emulate" the well-known entry - * point in Java. + * concerns. This is done here to "emulate" the well-known entry point in + * Java. * * @return void */ public static final function main () { - // Load config file - require(self::detectCorePath() . '/inc/config.php'); + // Load bootstrap file + require sprintf('%sbootstrap%sbootstrap.inc.php', self::detectFrameworkPath(), DIRECTORY_SEPARATOR); - // Load all include files - require($cfg->getConfigEntry('base_path') . 'inc/includes.php'); + /* + * Initial bootstrap is done, continue with initialization of + * framework. + */ + FrameworkBootstrap::initFramework(); - // Include the application selector - require($cfg->getConfigEntry('base_path') . 'inc/selector.php'); - } // END - main() -} // END - class + // Next initialize the detected application + FrameworkBootstrap::prepareApplication(); + + /* + * Last step is to start the application, this will also initialize and + * register the application instance in registry. + */ + FrameworkBootstrap::startApplication(); + } +} // Developer mode active? Comment out if no dev! -define('DEVELOPER', TRUE); +define('DEVELOPER', true); // Log all exceptions (only debug! This option can create large error logs) -//define('LOG_EXCEPTIONS', TRUE); +//define('LOG_EXCEPTIONS', true); -//* DEBUG: */ xdebug_start_trace(); +//xdebug_start_trace(); -// Do not remove the following line: +// Call above main() method ApplicationEntryPoint::main(); - -// [EOF] -?>