From 9b45e4d72f4db34ec9f0615666e58bca735dddf3 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Thu, 11 Jun 2015 19:16:29 +0200 Subject: [PATCH] Added mindmap documentation (may be moved to new project) + some improvements Signed-off-by: Roland Haeder --- .gitignore | 1 + .../class_CityConsoleDaemonCommand.php | 6 +- .../city/main/states/city/active/.htaccess | 1 + .../city/active/class_CityActiveState.php | 57 + .../templates/de/code/block_persona_data.ctp | 2 +- .../mindmaps/Simple City Growth Simulation.mm | 1803 +++++++++++++++++ 6 files changed, 1866 insertions(+), 4 deletions(-) create mode 100644 application/city/main/states/city/active/.htaccess create mode 100644 application/city/main/states/city/active/class_CityActiveState.php create mode 100644 docs/mindmaps/Simple City Growth Simulation.mm diff --git a/.gitignore b/.gitignore index 2779ca1..ee2490e 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ db/*/*.serialized docs/html/* docs/latex/* docs/warn.log +docs/mindmaps/*.html* inc/config/config-local.php templates/_compiled/*.* templates/images/_cache/*.* diff --git a/application/city/main/commands/console/class_CityConsoleDaemonCommand.php b/application/city/main/commands/console/class_CityConsoleDaemonCommand.php index 4dfed6b..57454d3 100644 --- a/application/city/main/commands/console/class_CityConsoleDaemonCommand.php +++ b/application/city/main/commands/console/class_CityConsoleDaemonCommand.php @@ -94,7 +94,7 @@ class CityConsoleDaemonCommand extends BaseCommand implements Commandable { * ----------------------------- Main loop ---------------------------- * This is the main loop. Queried calls should come back here very fast * so the whole application runs on nice speed. This while-loop goes - * until the hub is no longer active or all tasks are killed. + * until the application is no longer active or all tasks are killed. */ while (($cityInstance->isCityActive()) && ($handlerInstance->hasTasksLeft())) { // Handle all tasks here @@ -111,7 +111,7 @@ class CityConsoleDaemonCommand extends BaseCommand implements Commandable { * @param $controllerInstance A controller instance * @param $requestInstance An instance of a class with an Requestable interface * @return void - * @todo 0% done + * @todo ~10% done */ public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) { // Add pre filters @@ -125,7 +125,7 @@ class CityConsoleDaemonCommand extends BaseCommand implements Commandable { // Add city activation filters $controllerInstance->addActivationFilter(ObjectFactory::createObjectByConfiguredName('city_daemon_activation_task_handler_initializer_filter')); - // Add shutdown filters + // Add shutdown filters, you may want to shutdown the task handler has last one. $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('city_daemon_shutdown_task_handler_filter')); // This is the last generic shutdown filter diff --git a/application/city/main/states/city/active/.htaccess b/application/city/main/states/city/active/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/city/main/states/city/active/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/city/main/states/city/active/class_CityActiveState.php b/application/city/main/states/city/active/class_CityActiveState.php new file mode 100644 index 0000000..1a1b745 --- /dev/null +++ b/application/city/main/states/city/active/class_CityActiveState.php @@ -0,0 +1,57 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2015 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 . + */ +class CityActiveState extends BaseCityState implements Stateable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructo + parent::__construct(__CLASS__); + + // Set state name + $this->setStateName('active'); + } + + /** + * Creates an instance of this class + * + * @param $cityInstance An instance of a CityHelper class + * @return $stateInstance An instance of a Stateable class + */ + public static final function createCityActiveState (CityHelper $cityInstance) { + // Get new instance + $stateInstance = new CityActiveState(); + + // Get city instance and set 'active' flag + CityObjectFactory::createCityInstance()->enableIsActive(); + + // Return the prepared instance + return $stateInstance; + } +} + +// [EOF] +?> diff --git a/application/city/templates/de/code/block_persona_data.ctp b/application/city/templates/de/code/block_persona_data.ctp index 07ff64c..3b50438 100644 --- a/application/city/templates/de/code/block_persona_data.ctp +++ b/application/city/templates/de/code/block_persona_data.ctp @@ -17,7 +17,7 @@ $helperInstance->flushContent(); Spielerstatus: {?block_user_status?}
- {?currency?}: {?block_points?} + Kontostand: {?block_points?} {?currency?}
{?profile?} diff --git a/docs/mindmaps/Simple City Growth Simulation.mm b/docs/mindmaps/Simple City Growth Simulation.mm new file mode 100644 index 0000000..b812115 --- /dev/null +++ b/docs/mindmaps/Simple City Growth Simulation.mm @@ -0,0 +1,1803 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- 2.39.5