]> git.mxchange.org Git - city.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Mon, 1 Jan 2018 07:40:10 +0000 (08:40 +0100)
committerRoland Häder <roland@mxchange.org>
Tue, 2 Jan 2018 22:48:09 +0000 (23:48 +0100)
- "imported" classes/interfaces
- added task visitors for active and shutdown phase
- rename GameManager to GameOptionsManager
- updated core framework to latest commit

Signed-off-by: Roland Häder <roland@mxchange.org>
34 files changed:
application/city/classes/city_daemon/class_BaseCityDaemon.php
application/city/classes/commands/html/class_CityHtmlCityMapCommand.php
application/city/classes/database/frontend/city/class_CityInformationDatabaseWrapper.php
application/city/classes/database/frontend/city_entities/sections/class_CitySectionsDatabaseWrapper.php
application/city/classes/database/frontend/region/class_RegionInformationDatabaseWrapper.php
application/city/classes/filter/task/city_daemon/class_CityDaemonTaskHandlerInitializerFilter.php
application/city/classes/filter/verifier/class_CityNameVerifierFilter.php
application/city/classes/manager/city/class_CityManager.php
application/city/classes/manager/city_entities/districts/class_CityDistrictsManager.php
application/city/classes/manager/city_entities/lots/class_CityLotsManager.php
application/city/classes/manager/city_entities/sections/class_CitySectionsManager.php
application/city/classes/manager/game/class_GameManager.php [deleted file]
application/city/classes/manager/game/class_GameOptionsManager.php [new file with mode: 0644]
application/city/classes/tasks/class_BaseCityTask.php
application/city/classes/tasks/daemon/building/class_CityDaemonBuildingGrowthTask.php
application/city/classes/tasks/daemon/class_CityDaemon
application/city/classes/tasks/daemon/household/class_CityDaemonHouseholdGrowthTask.php
application/city/classes/tasks/daemon/map_expander/class_CityDaemonMapExpanderTask.php
application/city/classes/visitor/.htaccess [new file with mode: 0644]
application/city/classes/visitor/tasks/.htaccess [new file with mode: 0644]
application/city/classes/visitor/tasks/class_ActiveTaskVisitor.php [new file with mode: 0644]
application/city/classes/visitor/tasks/class_ShutdownTaskVisitor.php [new file with mode: 0644]
application/city/config.php
application/city/interfaces/manager/city/class_ManageableCity.php
application/city/interfaces/manager/city_entities/class_ManageableCityEntities.php
application/city/interfaces/manager/city_entities/districts/class_ManageableCityDistricts.php
application/city/interfaces/manager/city_entities/lots/class_ManageableCityLots.php
application/city/interfaces/manager/city_entities/sections/class_ManageableCitySections.php
application/city/interfaces/manager/class_Manageable.php
application/city/interfaces/manager/region/class_ManageableRegion.php
application/city/interfaces/manager/region/class_ManageableRegionMap.php
core
db/city_section/.htaccess [deleted file]
db/city_sections/.htaccess [new file with mode: 0644]

index 6efac6521f90bd13ee29f32404520424f68f9253..3543c393d2cf3b7bca3c313ffc7f4ec227e17569 100644 (file)
@@ -3,6 +3,7 @@
 namespace Org\Mxchange\City\Daemon;
 
 // Import application-specific stuff
+use Org\Mxchange\City\Factory\Manager\ManagerFactory;
 use Org\Mxchange\City\Factory\State\CityStateFactory;
 use Org\Mxchange\City\Generic\BaseCitySystem;
 use Org\Mxchange\City\Database\Frontend\Information\CityInformationDatabaseWrapper;
index b7d68b49e9ca02bec6b92b44fb2360fa271cdfcd..eccba6307fd2dbc8f1d6dc9a69916d18b8fba30d 100644 (file)
@@ -2,6 +2,10 @@
 // Own namespace
 namespace Org\Mxchange\City\Command;
 
+// Import application-specific stuff
+use Org\Mxchange\City\Factory\Manager\ManagerFactory;
+use Org\Mxchange\City\Manager\City\ManageableCity;
+
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Command\BaseCommand;
 use Org\Mxchange\CoreFramework\Command\Commandable;
index 96542933cbd96f7e59fc7d7f1b91f90b7a1f50b0..071b150d36334830f9e51d179b57fb009ba55deb 100644 (file)
@@ -4,7 +4,9 @@ namespace Org\Mxchange\City\Database\Frontend\Information;
 
 // Import application-specific stuff
 use Org\Mxchange\City\Daemon\BaseCityDaemon;
+use Org\Mxchange\City\Factory\Manager\ManagerFactory;
 use Org\Mxchange\City\Helper\CityHelper;
+use Org\Mxchange\City\Manager\City\ManageableCity;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Database\Frontend\BaseDatabaseWrapper;
index c7a07c30cdc03aee3f15018d3b7783ab51f4ab73..6f29ee848dbc310dfe588f3560d320802571f96c 100644 (file)
@@ -39,7 +39,7 @@ use Org\Mxchange\CoreFramework\Registry\Registerable;
  */
 class CitySectionsDatabaseWrapper extends BaseDatabaseWrapper implements CitySectionsWrapper, Registerable {
        // Constants for database table names
-       const DB_TABLE_CITY_SECTIONS = 'city_sections';
+       const DB_TABLE_CITY_SECTIONS           = 'city_sections';
 
        // Entry id
        const DB_COLUMN_ENTRY_ID               = 'entry_id';
index 6a4581a6110b496fd8eca224164d8e7016dca4e6..720f818607d02bec216abf0ddfb125c97c1c4da4 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Org\Mxchange\City\Database\Frontend\RegionInformation;
 
+// Import application-specific stuff
+use Org\Mxchange\City\Factory\Manager\ManagerFactory;
+
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Database\Frontend\BaseDatabaseWrapper;
 use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
index 8e73df199d68df78b642d7b5b046ca6492b0c543..c318db8c4a050bc4ccd786769aeea5b5a9f5646d 100644 (file)
@@ -9,6 +9,7 @@ use Org\Mxchange\City\Filter\BaseCityFilter;
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
 use Org\Mxchange\CoreFramework\Filter\Filterable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
 use Org\Mxchange\CoreFramework\Request\Requestable;
 use Org\Mxchange\CoreFramework\Response\Responseable;
 
index 816badce68e3e0b3687312e275e2b97554e2230e..b2ad8fbb110410227c3ce80731de4a3c312036b7 100644 (file)
@@ -4,6 +4,7 @@ namespace Org\Mxchange\City\Filter\Verifier;
 
 // Import application-specific stuff
 use Org\Mxchange\City\Database\Frontend\Information\CityInformationDatabaseWrapper;
+use Org\Mxchange\City\Factory\Manager\ManagerFactory;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Filter\BaseFilter;
index 208a356febfd61ecd32c82635d2d8bd8808e3914..6d7952818de5887b38fcad2dab8f948f74f52283 100644 (file)
@@ -4,6 +4,7 @@ namespace Org\Mxchange\City\Manager\City;
 
 // Import application-specific stuff
 use Org\Mxchange\City\Database\Frontend\Information\CityInformationDatabaseWrapper;
+use Org\Mxchange\City\Factory\Manager\ManagerFactory;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
index d308d42cb2280143fa934267a5f02523a4c69575..038e22ec77c7e40d7763de9dc3e4a21adfd13ab8 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 // Own namespace
-namespace Org\Mxchange\City\Manager\District;
+namespace Org\Mxchange\City\Manager\Entities\Districts;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory;
index 55cbbcb0182c6c4852f59167d7e0101645be3235..9a03e67919862262a5c4baf91d3e4443c5e07be9 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 // Own namespace
-namespace Org\Mxchange\City\Manager\Lots;
+namespace Org\Mxchange\City\Manager\Entities\Lots;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory;
index a04b8a3e309bddef22b30c950de4965efc13d5fa..2561dc15da579c48118a932166062bc0a990b5b2 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 // Own namespace
-namespace Org\Mxchange\City\Manager\Sections;
+namespace Org\Mxchange\City\Manager\Entities\Sections;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory;
diff --git a/application/city/classes/manager/game/class_GameManager.php b/application/city/classes/manager/game/class_GameManager.php
deleted file mode 100644 (file)
index 6427001..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-<?php
-// Own namespace
-namespace Org\Mxchange\City\Manager\Region;
-
-// Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory;
-
-/**
- * A game manager
- *
- * @author             Roland Haeder <webmaster@ship-simu.org>
- * @version            0.0.0
- * @copyright  Copyright (c) 2015, 2016 City Developer Team
- * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.ship-simu.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 <http://www.gnu.org/licenses/>.
- */
-class RegionManager extends BaseManager implements ManageableRegion {
-       /**
-        * Protected constructor
-        *
-        * @return      void
-        */
-       protected function __construct () {
-               // Call parent constructor
-               parent::__construct(__CLASS__);
-       }
-
-       /**
-        * Creates an instance of this class
-        *
-        * @return      $managerInstance        An instance of a ManageableRegion class
-        */
-       public final static function createRegionManager () {
-               // Get new instance
-               $managerInstance = new RegionManager();
-
-               // Get database wrapper
-               $wrapperInstance = DatabaseWrapperFactory::createWrapperByConfiguredName('region_info_db_wrapper_class');
-
-               // And set it here
-               $managerInstance->setWrapperInstance($wrapperInstance);
-
-               // Return the prepared instance
-               return $managerInstance;
-       }
-
-       /**
-        * Checks whether the current user has already founded a region
-        *
-        * @return      $isFounded      Whether the current user has already founded a region
-        */
-       public function ifUserHasCreatedRegion () {
-               // Check if the currently set user has already founded a region
-               $isFounded = $this->getWrapperInstance()->ifUserHasCreatedRegion();
-
-               // Return result
-               return $isFounded;
-       }
-
-       /**
-        * Checks whether the given region name is already taken
-        *
-        * @para        $regionName             Name of region
-        * @return      $isTaken                Whether the given region name is already taken
-        */
-       public function ifRegionNameExists ($regionName) {
-               // Check if the given region name is taken
-               $isTaken = $this->getWrapperInstance()->ifRegionExists($regionName);
-
-               // Return result
-               return $isTaken;
-       }
-
-       /**
-        * Founds the first region. A dummy region will also be created
-        *
-        * @return      $resultInstance         Found result after creating it
-        */
-       public function createFirstRegion () {
-               // Dummy name
-               // @TODO Move to language system
-               $regionName = 'Region 1';
-
-               // Some pre-checks
-               assert(!$this->ifUserHasCreatedRegion());
-               assert(!$this->ifRegionNameExists($regionName));
-
-               // First region can now be created
-               $this->getWrapperInstance()->createRegionByName($regionName);
-
-               // Then try to find it
-               assert($this->ifRegionNameExists($regionName));
-
-               // Get result instance
-               $resultInstance = $this->getResultInstance();
-
-               // And return it
-               return $resultInstance;
-       }
-}
diff --git a/application/city/classes/manager/game/class_GameOptionsManager.php b/application/city/classes/manager/game/class_GameOptionsManager.php
new file mode 100644 (file)
index 0000000..6eea04d
--- /dev/null
@@ -0,0 +1,59 @@
+<?php
+// Own namespace
+namespace Org\Mxchange\City\Manager\Region;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory;
+
+/**
+ * A game manager
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2015, 2016 City Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.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 <http://www.gnu.org/licenses/>.
+ */
+class GameOptionsManager extends BaseManager implements ManageableGame {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of this class
+        *
+        * @return      $managerInstance        An instance of a ManageableRegion class
+        */
+       public final static function createGameOptionsManager () {
+               // Get new instance
+               $managerInstance = new GameOptionsManager();
+
+               // Get database wrapper
+               $wrapperInstance = DatabaseWrapperFactory::createWrapperByConfiguredName('game_options_db_wrapper_class');
+
+               // And set it here
+               $managerInstance->setWrapperInstance($wrapperInstance);
+
+               // Return the prepared instance
+               return $managerInstance;
+       }
+}
index b61c2ea6064487f4a2f71cd3e3767484dd5c5ae4..a489bbd7399d1a9e3067a8d566991bc6ceae6e4b 100644 (file)
@@ -5,6 +5,9 @@ namespace Org\Mxchange\City\Task;
 // Import application-specific stuff
 use Org\Mxchange\City\Helper\CityHelper;
 
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+
 /**
  * A general CityTask class
  *
index 0a0a81726eefcb689224b6c051661867da1e8cc7..357f634ae16fd27aedfc670ae4ad75dc5746478a 100644 (file)
@@ -4,6 +4,12 @@ namespace Org\Mxchange\City\Daemon\Task\Growth\Building;
 
 // Import application-specific stuff
 use Org\Mxchange\City\Daemon\Factory\CityDaemonFactory;
+use Org\Mxchange\City\Task\BaseCityTask;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
 
 /**
  * A BuildingGrowth city daemon-task
index a230088d4c22bacf2cdac8ac1878418a83b4934d..073f377dbe4086b73235ef95f4324e2907b3dddf 100644 (file)
@@ -1,4 +1,13 @@
 <?php
+// Own namespace
+namespace Org\Mxchange\City\Daemon\Task\;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Task\BaseTask;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
+
 /**
  * A ??? city daemon-task
  *
index 646d0ce705453a5e130e170e6a85d8ffb2f3e00f..e960b4562f6701d29e48632adeff76a171de8570 100644 (file)
@@ -4,6 +4,12 @@ namespace Org\Mxchange\City\Daemon\Task\Growth\Household;
 
 // Import application-specific stuff
 use Org\Mxchange\City\Daemon\Factory\CityDaemonFactory;
+use Org\Mxchange\City\Task\BaseCityTask;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
 
 /**
  * A HouseholdGrowth city daemon-task
index 13c6666e0f4ba33d7658600dddd3daff9042ad33..81dc9725584c036f2ced88040d77162918071db8 100644 (file)
@@ -4,6 +4,12 @@ namespace Org\Mxchange\City\Daemon\Task\Expander\Map;
 
 // Import application-specific stuff
 use Org\Mxchange\City\Daemon\Factory\CityDaemonFactory;
+use Org\Mxchange\City\Task\BaseCityTask;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\Visitable;
+use Org\Mxchange\CoreFramework\Visitor\Visitor;
 
 /**
  * A map expander task for the daemon
diff --git a/application/city/classes/visitor/.htaccess b/application/city/classes/visitor/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/city/classes/visitor/tasks/.htaccess b/application/city/classes/visitor/tasks/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/city/classes/visitor/tasks/class_ActiveTaskVisitor.php b/application/city/classes/visitor/tasks/class_ActiveTaskVisitor.php
new file mode 100644 (file)
index 0000000..de78c14
--- /dev/null
@@ -0,0 +1,88 @@
+<?php
+// Own namespace
+namespace Org\Mxchange\City\Visitor\Task\Active;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Generic\BaseDecorator;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\BaseVisitor;
+use Org\Mxchange\CoreFramework\Visitor\Decorator\DecoratorVisitor;
+use Org\Mxchange\CoreFramework\Visitor\Task\TaskVisitor;
+
+/**
+ * An ActiveTask visitor
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Hub 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 <http://www.gnu.org/licenses/>.
+ */
+class ActiveTaskVisitor extends BaseVisitor implements TaskVisitor, DecoratorVisitor {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+
+               // Set visitor mode
+               $this->setVisitorMode('task');
+       }
+
+       /**
+        * Creates an instance of this class
+        *
+        * @return      $visitorInstance        An instance a Visitorable class
+        */
+       public static final function createActiveTaskVisitor () {
+               // Get new instance
+               $visitorInstance = new ActiveTaskVisitor();
+
+               // Return the prepared instance
+               return $visitorInstance;
+       }
+
+       /**
+        * Visits the given task instance
+        *
+        * @param       $taskInstance   A Taskable instance
+        * @return      void
+        */
+       public function visitTask (Taskable $taskInstance) {
+               // Execute the task from this visitor
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('ACTIVE-TASK-VISITOR: Visiting task ' . $taskInstance->__toString() . ' - CALLED!');
+               $taskInstance->executeTask();
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('ACTIVE-TASK-VISITOR: Visiting task ' . $taskInstance->__toString() . ' - EXIT!');
+       }
+
+       /**
+        * Visits the given decorator instance
+        *
+        * @param       $decoratorInstance      A decorator instance
+        * @return      void
+        */
+       public function visitDecorator (BaseDecorator $decoratorInstance) {
+               /*
+                * A decorator itself can never become an active task so this method
+                * remains empty.
+                */
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('ACTIVE-TASK-VISITOR: decoratorInstance=%s - CALLED!', $decoratorInstance->__toString()));
+       }
+
+}
diff --git a/application/city/classes/visitor/tasks/class_ShutdownTaskVisitor.php b/application/city/classes/visitor/tasks/class_ShutdownTaskVisitor.php
new file mode 100644 (file)
index 0000000..1996b48
--- /dev/null
@@ -0,0 +1,83 @@
+<?php
+// Own namespace
+namespace Org\Mxchange\City\Visitor\Task\Shutdown;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Generic\BaseDecorator;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Visitor\BaseVisitor;
+use Org\Mxchange\CoreFramework\Visitor\Decorator\DecoratorVisitor;
+use Org\Mxchange\CoreFramework\Visitor\Task\TaskVisitor;
+
+/**
+ * An ShutdownTask visitor
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Hub 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 <http://www.gnu.org/licenses/>.
+ */
+class ShutdownTaskVisitor extends BaseVisitor implements TaskVisitor, DecoratorVisitor {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+
+               // Set visitor mode
+               $this->setVisitorMode('task');
+       }
+
+       /**
+        * Creates an instance of this class
+        *
+        * @return      $visitorInstance                An instance a Visitorable class
+        */
+       public static final function createShutdownTaskVisitor () {
+               // Get new instance
+               $visitorInstance = new ShutdownTaskVisitor();
+
+               // Return the prepared instance
+               return $visitorInstance;
+       }
+
+       /**
+        * Visits the given task instance
+        *
+        * @param       $taskInstance   A Taskable instance
+        * @return      void
+        */
+       public function visitTask (Taskable $taskInstance) {
+               // Shutdown the task instance
+               $taskInstance->doShutdown();
+       }
+
+       /**
+        * Visits the given decorator instance
+        *
+        * @param       $decoratorInstance      A decorator instance
+        * @return      void
+        */
+       public function visitDecorator (BaseDecorator $decoratorInstance) {
+               // Shutdown the decorator instance
+               $decoratorInstance->doShutdown();
+       }
+
+}
index 30e847054989a87ce68c93dc9798d8a5d1e0e0ce..28745ee9296caf026894a290b272f1fe8957631c 100644 (file)
@@ -56,13 +56,13 @@ $cfg->setConfigEntry('game_options_db_wrapper_class', 'CityGameOptionsDatabaseWr
 $cfg->setConfigEntry('region_map_db_wrapper_class', 'RegionMapDatabaseWrapper');
 
 // CFG: CITY-SECTIONS-DB-WRAPPER-CLASS
-$cfg->setConfigEntry('city_sections_db_wrapper_class', 'CitySectionsDatabaseWrapper');
+$cfg->setConfigEntry('city_sections_db_wrapper_class', 'Org\Mxchange\City\Database\Frontend\Sections\CitySectionsDatabaseWrapper');
 
 // CFG: CITY-LOTS-DB-WRAPPER-CLASS
-$cfg->setConfigEntry('city_lots_db_wrapper_class', 'CityLotsDatabaseWrapper');
+$cfg->setConfigEntry('city_lots_db_wrapper_class', 'Org\Mxchange\City\Database\Frontend\Lots\CityLotsDatabaseWrapper');
 
 // CFG: CITY-DISTRICTS-DB-WRAPPER-CLASS
-$cfg->setConfigEntry('city_districts_db_wrapper_class', 'CityDistrictsDatabaseWrapper');
+$cfg->setConfigEntry('city_districts_db_wrapper_class', 'Org\Mxchange\City\Database\Frontend\Districts\CityDistrictsDatabaseWrapper');
 
 // CFG: CITY-INIT-STATE-CLASS
 $cfg->setConfigEntry('city_init_state_class', 'Org\Mxchange\City\State\Init\CityInitState');
@@ -477,7 +477,7 @@ $cfg->setConfigEntry('user_points_db_wrapper_class', 'UserPointsDatabaseWrapper'
 $cfg->setConfigEntry('user_government_wrapper_class', 'UserGovernmentDatabaseWrapper');
 
 // CFG: PAYMENT-DB-WRAPPER-CLASS
-$cfg->setConfigEntry('payment_db_wrapper_class', 'PaymentsDatabaseWrapper');
+$cfg->setConfigEntry('payment_db_wrapper_class', 'Org\Mxchange\CoreFramework\Database\Frontend\PaymentsDatabaseWrapper');
 
 // CFG: LOGIN-ENABLED
 $cfg->setConfigEntry('login_enabled', 'Y');
@@ -486,22 +486,22 @@ $cfg->setConfigEntry('login_enabled', 'Y');
 $cfg->setConfigEntry('login_type', 'username');
 
 // CFG: CITY-MANAGER-CLASS
-$cfg->setConfigEntry('city_manager_class', 'CityManager');
+$cfg->setConfigEntry('city_manager_class', 'Org\Mxchange\City\Manager\City\CityManager');
 
 // CFG: CITY-SECTIONS-MANAGER-CLASS
-$cfg->setConfigEntry('city_sections_manager_class', 'CitySectionsManager');
+$cfg->setConfigEntry('city_sections_manager_class', 'Org\Mxchange\City\Manager\Entities\Sections\CitySectionsManager');
 
 // CFG: CITY-LOTS-MANAGER-CLASS
-$cfg->setConfigEntry('city_lots_manager_class', 'CityLotsManager');
+$cfg->setConfigEntry('city_lots_manager_class', 'Org\Mxchange\City\Manager\Entities\Lots\CityLotsManager');
 
 // CFG: CITY-DISTRICTS-MANAGER-CLASS
-$cfg->setConfigEntry('city_districts_manager_class', 'CityDistrictsManager');
+$cfg->setConfigEntry('city_districts_manager_class', 'Org\Mxchange\City\Manager\Entities\Districts\CityDistrictsManager');
 
 // CFG: REGION-MANAGER-CLASS
-$cfg->setConfigEntry('region_manager_class', 'RegionManager');
+$cfg->setConfigEntry('region_manager_class', 'Org\Mxchange\City\Manager\Region\RegionManager');
 
 // CFG: REGION-MAP-MANAGER-CLASS
-$cfg->setConfigEntry('region_map_manager_class', 'RegionMapManager');
+$cfg->setConfigEntry('region_map_manager_class', 'Org\Mxchange\City\Manager\RegionMap\RegionMapManager');
 
 /******************************************************************************
  *                                  Daemon                                    *
@@ -550,7 +550,7 @@ $cfg->setConfigEntry('news_reader_daemon_class', 'Org\Mxchange\CoreFramework\Rea
 $cfg->setConfigEntry('news_daemon_limit', 5);
 
 // CFG: CITY-DAEMON-MAP-EXPANDER-TASK-CLASS
-$cfg->setConfigEntry('city_daemon_map_expander_task_class', 'CityDaemonMapExpanderTask');
+$cfg->setConfigEntry('city_daemon_map_expander_task_class', 'Org\Mxchange\City\Daemon\Task\Expander\Map\CityDaemonMapExpanderTask');
 
 // CFG: TASK-MAP-EXPANDER-STARTUP-DELAY
 $cfg->setConfigEntry('task_map_expander_startup_delay', 500);
@@ -562,7 +562,7 @@ $cfg->setConfigEntry('task_map_expander_interval_delay', 100);
 $cfg->setConfigEntry('task_map_expander_max_runs', 0);
 
 // CFG: CITY-DAEMON-HOUSEHOLD-GROWTH-TASK-CLASS
-$cfg->setConfigEntry('city_daemon_household_growth_task_class', 'CityDaemonHouseholdGrowthTask');
+$cfg->setConfigEntry('city_daemon_household_growth_task_class', 'Org\Mxchange\City\Daemon\Task\Growth\Household\CityDaemonHouseholdGrowthTask');
 
 // CFG: TASK-HOUSEHOLD-GROWTH-STARTUP-DELAY
 $cfg->setConfigEntry('task_household_growth_startup_delay', 1000);
@@ -574,7 +574,7 @@ $cfg->setConfigEntry('task_household_growth_interval_delay', 200);
 $cfg->setConfigEntry('task_household_growth_max_runs', 0);
 
 // CFG: CITY-DAEMON-BUILDING-GROWTH-TASK-CLASS
-$cfg->setConfigEntry('city_daemon_building_growth_task_class', 'CityDaemonBuildingGrowthTask');
+$cfg->setConfigEntry('city_daemon_building_growth_task_class', 'Org\Mxchange\City\Daemon\Task\Growth\Building\CityDaemonBuildingGrowthTask');
 
 // CFG: TASK-BUILDING-GROWTH-STARTUP-DELAY
 $cfg->setConfigEntry('task_building_growth_startup_delay', 1000);
@@ -593,3 +593,9 @@ $cfg->setConfigEntry('city_max_initial_up_expansion', 5);
 
 // CFG: CITY-MAX-INITIAL-DOWN-EXPANSION
 $cfg->setConfigEntry('city_max_initial_down_expansion', 3);
+
+// CFG: ACTIVE-TASK-VISITOR-CLASS
+$cfg->setConfigEntry('active_task_visitor_class', 'Org\Mxchange\City\Visitor\Task\Active\ActiveTaskVisitor');
+
+// CFG: SHUTDOWN-TASK-VISITOR-CLASS
+$cfg->setConfigEntry('shutdown_task_visitor_class', 'Org\Mxchange\CoreFramework\Visitor\Task\Shutdown\ShutdownTaskVisitor');
index 0055983115fd9e48d9dd8958e824c56ec6ae5745..dd17ca3bcf4027ff21ca354a9c5e49d1be5b1975 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Org\Mxchange\City\Manager\City;
+
+// Import own stuff
+use Org\Mxchange\City\Manager\Manageable;
+
 /**
  * An interface city manager
  *
index 3d1908da214ad971f335ba579e33e049b8c7d1e6..22be45f1fbc45e333bee45e011d1295d67900da1 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Org\Mxchange\City\Manager\Entities;
+
+// Import own stuff
+use Org\Mxchange\City\Manager\Manageable;
+
 /**
  * An interface entities manager
  *
index b83a02fb319795168f28c6f783bd5decc017a89b..cfaf9eb92e0cabf0b152178aed0147e0dc610f0e 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Org\Mxchange\City\Manager\Entities\Districts;
+
+// Import own stuff
+use Org\Mxchange\City\Manager\Entities\ManageableCityEntities;
+
 /**
  * An interface districts manager
  *
index 8e7a7bedf8b17b4c449afb15957c071ab3c58b00..c48102f8db3107a8b0c3bd23e5033b5062d823b9 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Org\Mxchange\City\Manager\Entities\Lots;
+
+// Import own stuff
+use Org\Mxchange\City\Manager\Entities\ManageableCityEntities;
+
 /**
  * An interface lots manager
  *
index a373f4262db9840168d56d8b7a3b7177865af857..3b01e69b056b55f9cf85b776c8b518e664e81a7f 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Org\Mxchange\City\Manager\Entities\Sections;
+
+// Import own stuff
+use Org\Mxchange\City\Manager\Entities\ManageableCityEntities;
+
 /**
  * An interface sections manager
  *
index 48d9b59eb2df226a3eca1ce999dd577d5b4da4b9..ca959261c95f8467af54630ed2ed9033af553553 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Org\Mxchange\City\Manager;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
+
 /**
  * A general interface for all manager classes
  *
index ac173dd1165629df7cbeda516dfedec3ad095be4..76a12fef350a45384fc073b1861b37edbb31cd63 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Org\Mxchange\City\Manager\Region;
+
+// Import own stuff
+use Org\Mxchange\City\Manager\Manageable;
+
 /**
  * An interface region manager
  *
index b46c0bb825a39e06ce54e163e589ebd8a0709410..8923c558d6155ec952fa61f202ae096f114d10a3 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Org\Mxchange\City\Manager\RegionMap;
+
+// Import own stuff
+use Org\Mxchange\City\Manager\Manageable;
+
 /**
  * An interface region map manager
  *
diff --git a/core b/core
index 2882b57ca6f372b822f96034ff2fe6aafd7daeb8..14dcd1503b3965144b5450299f3208d9b052cfc0 160000 (submodule)
--- a/core
+++ b/core
@@ -1 +1 @@
-Subproject commit 2882b57ca6f372b822f96034ff2fe6aafd7daeb8
+Subproject commit 14dcd1503b3965144b5450299f3208d9b052cfc0
diff --git a/db/city_section/.htaccess b/db/city_section/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/db/city_sections/.htaccess b/db/city_sections/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all