]> git.mxchange.org Git - city.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Wed, 2 Dec 2020 01:13:48 +0000 (02:13 +0100)
committerRoland Häder <roland@mxchange.org>
Wed, 2 Dec 2020 01:13:48 +0000 (02:13 +0100)
- renamed "Wrapper" to "Frontend"
- added missing trait for above instance
- removed all .htaccess files
- updated core framework

Signed-off-by: Roland Häder <roland@mxchange.org>
148 files changed:
application/.htaccess [deleted file]
application/city/.htaccess [deleted file]
application/city/classes/.htaccess [deleted file]
application/city/classes/actions/.htaccess [deleted file]
application/city/classes/actions/class_BaseCityAction.php
application/city/classes/actions/html/.htaccess [deleted file]
application/city/classes/actions/html/city/.htaccess [deleted file]
application/city/classes/city_daemon/.htaccess [deleted file]
application/city/classes/city_daemon/class_BaseCityDaemon.php
application/city/classes/city_daemon/default/.htaccess [deleted file]
application/city/classes/class_BaseCitySystem.php
application/city/classes/commands/.htaccess [deleted file]
application/city/classes/commands/console/.htaccess [deleted file]
application/city/classes/commands/html/.htaccess [deleted file]
application/city/classes/commands/html/class_CityHtmlConfirmCommand.php
application/city/classes/commands/html/class_CityHtmlResendLinkCommand.php
application/city/classes/controller/.htaccess [deleted file]
application/city/classes/controller/console/.htaccess [deleted file]
application/city/classes/controller/html/.htaccess [deleted file]
application/city/classes/controller/html/form/.htaccess [deleted file]
application/city/classes/controller/html/login/.htaccess [deleted file]
application/city/classes/database/.htaccess [deleted file]
application/city/classes/database/frontend/.htaccess [deleted file]
application/city/classes/database/frontend/city/.htaccess [deleted file]
application/city/classes/database/frontend/city/class_CityInformationDatabaseFrontend.php [new file with mode: 0644]
application/city/classes/database/frontend/city/class_CityInformationDatabaseWrapper.php [deleted file]
application/city/classes/database/frontend/city_entities/.htaccess [deleted file]
application/city/classes/database/frontend/city_entities/districts/.htaccess [deleted file]
application/city/classes/database/frontend/city_entities/districts/class_CityDistrictsDatabaseFrontend.php [new file with mode: 0644]
application/city/classes/database/frontend/city_entities/districts/class_CityDistrictsDatabaseWrapper.php [deleted file]
application/city/classes/database/frontend/city_entities/lots/.htaccess [deleted file]
application/city/classes/database/frontend/city_entities/lots/class_CityLotsDatabaseFrontend.php [new file with mode: 0644]
application/city/classes/database/frontend/city_entities/lots/class_CityLotsDatabaseWrapper.php [deleted file]
application/city/classes/database/frontend/city_entities/sections/.htaccess [deleted file]
application/city/classes/database/frontend/city_entities/sections/class_CitySectionsDatabaseFrontend.php [new file with mode: 0644]
application/city/classes/database/frontend/city_entities/sections/class_CitySectionsDatabaseWrapper.php [deleted file]
application/city/classes/database/frontend/game_options/.htaccess [deleted file]
application/city/classes/database/frontend/game_options/class_CityGameOptionsDatabaseFrontend.php [new file with mode: 0644]
application/city/classes/database/frontend/game_options/class_CityGameOptionsDatabaseWrapper.php [deleted file]
application/city/classes/database/frontend/region/.htaccess [deleted file]
application/city/classes/database/frontend/region/class_RegionInformationDatabaseWrapper.php
application/city/classes/database/frontend/region_map/.htaccess [deleted file]
application/city/classes/database/frontend/region_map/class_RegionMapDatabaseFrontend.php [new file with mode: 0644]
application/city/classes/database/frontend/region_map/class_RegionMapDatabaseWrapper.php [deleted file]
application/city/classes/factories/.htaccess [deleted file]
application/city/classes/factories/city_daemon/.htaccess [deleted file]
application/city/classes/factories/manager/.htaccess [deleted file]
application/city/classes/factories/states/.htaccess [deleted file]
application/city/classes/factories/states/city/.htaccess [deleted file]
application/city/classes/filter/.htaccess [deleted file]
application/city/classes/filter/bootstrap/.htaccess [deleted file]
application/city/classes/filter/bootstrap/city_daemon/.htaccess [deleted file]
application/city/classes/filter/bootstrap/init/.htaccess [deleted file]
application/city/classes/filter/city_daemon/.htaccess [deleted file]
application/city/classes/filter/class_BaseCityFilter.php
application/city/classes/filter/shutdown/.htaccess [deleted file]
application/city/classes/filter/shutdown/city/.htaccess [deleted file]
application/city/classes/filter/task/.htaccess [deleted file]
application/city/classes/filter/task/city_daemon/.htaccess [deleted file]
application/city/classes/filter/verifier/.htaccess [deleted file]
application/city/classes/filter/verifier/class_CityNameVerifierFilter.php
application/city/classes/login/.htaccess [deleted file]
application/city/classes/login/helper/.htaccess [deleted file]
application/city/classes/manager/.htaccess [deleted file]
application/city/classes/manager/city/.htaccess [deleted file]
application/city/classes/manager/city/class_CityManager.php
application/city/classes/manager/city_entities/.htaccess [deleted file]
application/city/classes/manager/city_entities/districts/.htaccess [deleted file]
application/city/classes/manager/city_entities/districts/class_CityDistrictsManager.php
application/city/classes/manager/city_entities/lots/.htaccess [deleted file]
application/city/classes/manager/city_entities/lots/class_CityLotsManager.php
application/city/classes/manager/city_entities/sections/.htaccess [deleted file]
application/city/classes/manager/city_entities/sections/class_CitySectionsManager.php
application/city/classes/manager/class_BaseManager.php
application/city/classes/manager/game/.htaccess [deleted file]
application/city/classes/manager/game/class_GameOptionsManager.php
application/city/classes/manager/region/.htaccess [deleted file]
application/city/classes/manager/region/class_RegionManager.php
application/city/classes/manager/region/class_RegionMapManager.php
application/city/classes/menu/.htaccess [deleted file]
application/city/classes/menu/government/.htaccess [deleted file]
application/city/classes/registration/.htaccess [deleted file]
application/city/classes/registration/class_CityRegistration.php
application/city/classes/resolver/.htaccess [deleted file]
application/city/classes/resolver/command/.htaccess [deleted file]
application/city/classes/resolver/command/console/.htaccess [deleted file]
application/city/classes/resolver/command/html/.htaccess [deleted file]
application/city/classes/resolver/controller/.htaccess [deleted file]
application/city/classes/resolver/controller/console/.htaccess [deleted file]
application/city/classes/resolver/controller/html/.htaccess [deleted file]
application/city/classes/resolver/controller/image/.htaccess [deleted file]
application/city/classes/states/.htaccess [deleted file]
application/city/classes/states/city/.htaccess [deleted file]
application/city/classes/states/city/active/.htaccess [deleted file]
application/city/classes/states/city/class_BaseCityState.php
application/city/classes/states/city/init/.htaccess [deleted file]
application/city/classes/tasks/.htaccess [deleted file]
application/city/classes/tasks/class_BaseCityTask.php
application/city/classes/tasks/daemon/.htaccess [deleted file]
application/city/classes/tasks/daemon/building/.htaccess [deleted file]
application/city/classes/tasks/daemon/household/.htaccess [deleted file]
application/city/classes/tasks/daemon/map_expander/.htaccess [deleted file]
application/city/classes/visitor/.htaccess [deleted file]
application/city/classes/visitor/tasks/.htaccess [deleted file]
application/city/config.php
application/city/exceptions/.htaccess [deleted file]
application/city/interfaces/.htaccess [deleted file]
application/city/interfaces/database/.htaccess [deleted file]
application/city/interfaces/database/frontend/.htaccess [deleted file]
application/city/interfaces/database/frontend/city/.htaccess [deleted file]
application/city/interfaces/database/frontend/city/class_CityInformationFrontend.php [new file with mode: 0644]
application/city/interfaces/database/frontend/city/class_CityInformationWrapper.php [deleted file]
application/city/interfaces/database/frontend/city_entities/.htaccess [deleted file]
application/city/interfaces/database/frontend/city_entities/districts/.htaccess [deleted file]
application/city/interfaces/database/frontend/city_entities/districts/class_CityDistrictsFrontend.php [new file with mode: 0644]
application/city/interfaces/database/frontend/city_entities/districts/class_CityDistrictsWrapper.php [deleted file]
application/city/interfaces/database/frontend/city_entities/lots/.htaccess [deleted file]
application/city/interfaces/database/frontend/city_entities/lots/class_CityLotsFrontend.php [new file with mode: 0644]
application/city/interfaces/database/frontend/city_entities/lots/class_CityLotsWrapper.php [deleted file]
application/city/interfaces/database/frontend/city_entities/sections/.htaccess [deleted file]
application/city/interfaces/database/frontend/city_entities/sections/class_CitySectionsFrontend.php [new file with mode: 0644]
application/city/interfaces/database/frontend/city_entities/sections/class_CitySectionsWrapper.php [deleted file]
application/city/interfaces/database/frontend/game_options/.htaccess [deleted file]
application/city/interfaces/database/frontend/game_options/class_CityGameOptionsFrontend.php [new file with mode: 0644]
application/city/interfaces/database/frontend/game_options/class_CityGameOptionsWrapper.php [deleted file]
application/city/interfaces/database/frontend/region/.htaccess [deleted file]
application/city/interfaces/database/frontend/region/class_RegionInformationFrontend.php [new file with mode: 0644]
application/city/interfaces/database/frontend/region/class_RegionInformationWrapper.php [deleted file]
application/city/interfaces/database/frontend/region/class_RegionMapFrontend.php [new file with mode: 0644]
application/city/interfaces/database/frontend/region/class_RegionMapWrapper.php [deleted file]
application/city/interfaces/helper/.htaccess [deleted file]
application/city/interfaces/helper/city/.htaccess [deleted file]
application/city/interfaces/manager/.htaccess [deleted file]
application/city/interfaces/manager/city/.htaccess [deleted file]
application/city/interfaces/manager/city/class_ManageableCity.php
application/city/interfaces/manager/city_entities/.htaccess [deleted file]
application/city/interfaces/manager/city_entities/districts/.htaccess [deleted file]
application/city/interfaces/manager/city_entities/lots/.htaccess [deleted file]
application/city/interfaces/manager/city_entities/sections/.htaccess [deleted file]
application/city/interfaces/manager/region/.htaccess [deleted file]
application/city/language/.htaccess [deleted file]
application/city/templates/.htaccess [deleted file]
application/city/templates/code/.htaccess [deleted file]
application/city/templates/emails/.htaccess [deleted file]
application/city/templates/html/.htaccess [deleted file]
application/city/templates/image/.htaccess [deleted file]
application/city/templates/menu/.htaccess [deleted file]
core

diff --git a/application/.htaccess b/application/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/.htaccess b/application/city/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/.htaccess b/application/city/classes/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/actions/.htaccess b/application/city/classes/actions/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
index 595c4d42513ccfe096cf25802399244be70c7096..ee069c8d0bca6818676be487e5615750e1fba36e 100644 (file)
@@ -36,7 +36,7 @@ abstract class BaseCityAction extends BaseAction {
         * @param       $className      Name of the class
         * @return      void
         */
-       protected function __construct ($className) {
+       protected function __construct (string $className) {
                // Call parent constructor
                parent::__construct($className);
        }
diff --git a/application/city/classes/actions/html/.htaccess b/application/city/classes/actions/html/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/actions/html/city/.htaccess b/application/city/classes/actions/html/city/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/city_daemon/.htaccess b/application/city/classes/city_daemon/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
index 5e743d1908d1e8ab133d593d9f2fe905b5c3f370..ded79a3a8656d3698bd635114b3bc1aae18ee656 100644 (file)
@@ -6,19 +6,21 @@ namespace Org\Mxchange\City\Daemon;
 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;
+use Org\Mxchange\City\Database\Frontend\Information\CityInformationDatabaseFrontend;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\Criteria\Add\AddableCriteria;
 use Org\Mxchange\CoreFramework\Criteria\Storing\StoreableCriteria;
-use Org\Mxchange\CoreFramework\Database\Frontend\User\UserDatabaseWrapper;
+use Org\Mxchange\CoreFramework\Database\Frontend\User\UserDatabaseFrontend;
 use Org\Mxchange\CoreFramework\Database\Updateable;
-use Org\Mxchange\CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory;
+use Org\Mxchange\CoreFramework\Factory\Database\Frontend\DatabaseFrontendFactory;
 use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;;
 use Org\Mxchange\CoreFramework\Request\Requestable;
 use Org\Mxchange\CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Traits\Crypto\CryptoTrait;
+use Org\Mxchange\CoreFramework\Traits\Database\Frontend\DatabaseFrontendTrait;
 
 /**
  * A general City class
@@ -43,6 +45,10 @@ use Org\Mxchange\CoreFramework\Response\Responseable;
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 abstract class BaseCityDaemon extends BaseCitySystem implements Updateable, AddableCriteria {
+       // Load traits
+       use CryptoTrait;
+       use DatabaseFrontendTrait;
+
        /**
         * City types
         */
@@ -60,15 +66,15 @@ abstract class BaseCityDaemon extends BaseCitySystem implements Updateable, Adda
         * @param       $className      Name of the class
         * @return      void
         */
-       protected function __construct ($className) {
+       protected function __construct (string $className) {
                // Call parent constructor
                parent::__construct($className);
 
-               // Get a wrapper instance
-               $wrapperInstance = DatabaseWrapperFactory::createWrapperByConfiguredName('city_info_db_wrapper_class');
+               // Get a frontend instance
+               $frontendInstance = DatabaseFrontendFactory::createFrontendByConfiguredName('city_info_db_frontend_class');
 
                // Set it here
-               $this->setWrapperInstance($wrapperInstance);
+               $this->setFrontendInstance($frontendInstance);
 
                // Get a crypto instance
                $cryptoInstance = ObjectFactory::createObjectByConfiguredName('crypto_class');
@@ -126,11 +132,11 @@ abstract class BaseCityDaemon extends BaseCitySystem implements Updateable, Adda
                assert($requestInstance instanceof Requestable);
 
                // Add City number and type
-               $criteriaInstance->addCriteria(CityInformationDatabaseWrapper::DB_COLUMN_CITY_ID  , 1);
-               $criteriaInstance->addCriteria(CityInformationDatabaseWrapper::DB_COLUMN_CITY_MODE, $requestInstance->getRequestElement('mode'));
+               $criteriaInstance->addCriteria(CityInformationDatabaseFrontend::DB_COLUMN_CITY_ID  , 1);
+               $criteriaInstance->addCriteria(CityInformationDatabaseFrontend::DB_COLUMN_CITY_MODE, $requestInstance->getRequestElement('mode'));
 
                // Add the City id
-               $criteriaInstance->addCriteria(CityInformationDatabaseWrapper::DB_COLUMN_CITY_ID, $this->getCityId());
+               $criteriaInstance->addCriteria(CityInformationDatabaseFrontend::DB_COLUMN_CITY_ID, $this->getCityId());
        }
 
        /**
@@ -151,7 +157,7 @@ abstract class BaseCityDaemon extends BaseCitySystem implements Updateable, Adda
                $searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
 
                // Add search criteria
-               $searchInstance->addCriteria(UserDatabaseWrapper::DB_COLUMN_USERNAME, $this->getUserName());
+               $searchInstance->addCriteria(UserDatabaseFrontend::DB_COLUMN_USERNAME, $this->getUserName());
                $searchInstance->setLimit(1);
 
                // Now get another criteria
@@ -163,8 +169,8 @@ abstract class BaseCityDaemon extends BaseCitySystem implements Updateable, Adda
                // Add the search criteria for searching for the right entry
                $updateInstance->setSearchInstance($searchInstance);
 
-               // Set wrapper class name
-               $updateInstance->setWrapperConfigEntry('user_db_wrapper_class');
+               // Set frontend class name
+               $updateInstance->setFrontendConfigEntry('user_db_frontend_class');
 
                // Remember the update in database result
                $this->getResultInstance()->add2UpdateQueue($updateInstance);
@@ -234,7 +240,7 @@ abstract class BaseCityDaemon extends BaseCitySystem implements Updateable, Adda
         */
        public function addArrayToDataSet (StoreableCriteria $dataSetInstance, array $cityData) {
                // Add all data the array provides
-               foreach (CityInformationDatabaseWrapper::getAllElements() as $element) {
+               foreach (CityInformationDatabaseFrontend::getAllElements() as $element) {
                        // Is the element there?
                        if (isset($cityData[$element])) {
                                // Add it
diff --git a/application/city/classes/city_daemon/default/.htaccess b/application/city/classes/city_daemon/default/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
index 084a71621452466fa861097b2a2bada54631329d..13d1a29e50a0a314fc42606ee5fb83882f6f62c5 100644 (file)
@@ -49,7 +49,7 @@ abstract class BaseCitySystem extends BaseFrameworkSystem {
         * @param       $className      Name of the class
         * @return      void
         */
-       protected function __construct ($className) {
+       protected function __construct (string $className) {
                // Call parent constructor
                parent::__construct($className);
        }
diff --git a/application/city/classes/commands/.htaccess b/application/city/classes/commands/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/commands/console/.htaccess b/application/city/classes/commands/console/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/commands/html/.htaccess b/application/city/classes/commands/html/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
index 888875684cfdf49c0be3ee5d30ec337fdefa3050..50b056694c83adc01a1d3d3f4a99d46f33bb3db8 100644 (file)
@@ -7,7 +7,7 @@ use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\Command\BaseCommand;
 use Org\Mxchange\CoreFramework\Command\Commandable;
 use Org\Mxchange\CoreFramework\Controller\Controller;
-use Org\Mxchange\CoreFramework\Database\Frontend\User\UserDatabaseWrapper;
+use Org\Mxchange\CoreFramework\Database\Frontend\User\UserDatabaseFrontend;
 use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
 use Org\Mxchange\CoreFramework\Generic\NullPointerException;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
@@ -123,7 +123,7 @@ class CityHtmlConfirmCommand extends BaseCommand implements Commandable {
                }
 
                // Set username
-               $templateInstance->assignVariable('username', $userInstance->getField(UserDatabaseWrapper::DB_COLUMN_USERNAME));
+               $templateInstance->assignVariable('username', $userInstance->getField(UserDatabaseFrontend::DB_COLUMN_USERNAME));
 
                // 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.
index 55f82f027c22a3731e3960e6c8225f5597bd73f6..5107e75d796a0d2f406262d5fb9ab9a9c5d24ad1 100644 (file)
@@ -7,7 +7,7 @@ use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\Command\BaseCommand;
 use Org\Mxchange\CoreFramework\Command\Commandable;
 use Org\Mxchange\CoreFramework\Controller\Controller;
-use Org\Mxchange\CoreFramework\Database\Frontend\User\UserDatabaseWrapper;
+use Org\Mxchange\CoreFramework\Database\Frontend\User\UserDatabaseFrontend;
 use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 use Org\Mxchange\CoreFramework\Request\Requestable;
@@ -91,7 +91,7 @@ class CityHtmlResendLinkCommand extends BaseCommand implements Commandable {
                $hashedString = $cryptoInstance->hashString($cryptoInstance->encryptString($randomString));
 
                // Update the user class
-               $userInstance->updateDatabaseField(UserDatabaseWrapper::DB_COLUMN_CONFIRM_HASH, $hashedString);
+               $userInstance->updateDatabaseField(UserDatabaseFrontend::DB_COLUMN_CONFIRM_HASH, $hashedString);
 
                // Re-set config entry to mailer engine
                FrameworkBootstrap::getConfigurationInstance()->setConfigEntry('html_template_class', FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('mail_template_class'));
diff --git a/application/city/classes/controller/.htaccess b/application/city/classes/controller/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/controller/console/.htaccess b/application/city/classes/controller/console/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/controller/html/.htaccess b/application/city/classes/controller/html/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/controller/html/form/.htaccess b/application/city/classes/controller/html/form/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/controller/html/login/.htaccess b/application/city/classes/controller/html/login/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/database/.htaccess b/application/city/classes/database/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/database/frontend/.htaccess b/application/city/classes/database/frontend/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/database/frontend/city/.htaccess b/application/city/classes/database/frontend/city/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/database/frontend/city/class_CityInformationDatabaseFrontend.php b/application/city/classes/database/frontend/city/class_CityInformationDatabaseFrontend.php
new file mode 100644 (file)
index 0000000..1a795ef
--- /dev/null
@@ -0,0 +1,284 @@
+<?php
+// Own namespace
+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\BaseDatabaseFrontend;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+
+/**
+ * A database frontend for city informations
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.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.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 CityInformationDatabaseFrontend extends BaseDatabaseFrontend implements CityInformationFrontend, Registerable {
+       // Constants for database table names
+       const DB_TABLE_CITY_INFORMATION = 'city_data';
+
+       // Constants for database column names
+       const DB_COLUMN_CITY_ID          = 'city_id';
+       const DB_COLUMN_CITY_MODE        = 'city_mode';
+       const DB_COLUMN_CITY_NAME        = 'city_name';
+       const DB_COLUMN_CITY_USER_ID     = 'city_user_id';
+       const DB_COLUMN_CITY_REGION_ID   = 'city_region_id';
+
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of this database frontend by a provided user class
+        *
+        * @return      $frontendInstance       An instance of the created frontend class
+        */
+       public static final function createCityInformationDatabaseFrontend () {
+               // Get a new instance
+               $frontendInstance = new CityInformationDatabaseFrontend();
+
+               // Set (primary!) table name
+               $frontendInstance->setTableName(self::DB_TABLE_CITY_INFORMATION);
+
+               // Return the instance
+               return $frontendInstance;
+       }
+
+       /**
+        * Checks whether there is an entry for given city instance
+        *
+        * @param       $cityInstance   An instance of a CityHelper class
+        * @return      $isFound                Whether a city id has been found for this city
+        */
+       public function ifCityDataIsFound (CityHelper $cityInstance) {
+               // Now get a search criteria instance
+               $searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
+
+               // Search for the city number one which is hard-coded the default
+               $searchInstance->addCriteria(CityInformationDatabaseFrontend::DB_COLUMN_CITY_ID  , 1);
+               $searchInstance->addCriteria(CityInformationDatabaseFrontend::DB_COLUMN_CITY_MODE, $cityInstance->getRequestInstance()->getRequestElement('mode'));
+               $searchInstance->setLimit(1);
+
+               // Get a result back
+               $resultInstance = $this->doSelectByCriteria($searchInstance);
+
+               // Set result instance in city instance
+               $cityInstance->setResultInstance($resultInstance);
+
+               // Is it valid?
+               $isFound = $resultInstance->next();
+
+               // Return it
+               return $isFound;
+       }
+
+       /**
+        * 'Registers' a new city id along with data provided in the city instance.
+        * This may sound confusing but avoids double code very nicely...
+        *
+        * @param       $cityInstance           A city instance
+        * @param       $requestInstance        An instance of a Requestable class
+        * @return      void
+        */
+       public function registerCityId (BaseCityDaemon $cityInstance, Requestable $requestInstance) {
+               // Get a dataset instance
+               $dataSetInstance = ObjectFactory::createObjectByConfiguredName('dataset_criteria_class', array(self::DB_TABLE_CITY_INFORMATION));
+
+               // Set the primary key
+               $dataSetInstance->setUniqueKey(self::DB_COLUMN_CITY_ID);
+
+               // Add registration elements to the dataset
+               $cityInstance->addElementsToDataSet($dataSetInstance, $requestInstance);
+
+               // "Insert" this dataset instance completely into the database
+               $this->queryInsertDataSet($dataSetInstance);
+       }
+
+       /**
+        * Removes non-public data from given array.
+        *
+        * @param       $data   An array with possible non-public data that needs to be removed.
+        * @return      $data   A cleaned up array with only public data.
+        */
+       public function removeNonPublicDataFromArray(array $data) {
+               // Currently call only inner method
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CITY-WRAPPER[' . __METHOD__ . ':' . __LINE__ . ']: Calling parent::removeNonPublicDataFromArray(data) ...');
+               $data = parent::removeNonPublicDataFromArray($data);
+
+               // Return cleaned data
+               return $data;
+       }
+
+       /**
+        * Checks whether the user has already founded a city
+        *
+        * @return      $hasFounded             Whether the user has already founded a city
+        */
+       public function ifUserHasFoundedCity () {
+               // Get user instance
+               $userInstance = GenericRegistry::getRegistry()->getInstance('user');
+
+               // Now get a search criteria instance
+               $searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
+
+               // Search for user's cities
+               $searchInstance->addCriteria(CityInformationDatabaseFrontend::DB_COLUMN_CITY_USER_ID, $userInstance->getUserId());
+
+               // Get a result back
+               $resultInstance = $this->doSelectByCriteria($searchInstance);
+
+               // Get city manager instance
+               $managerInstance = ManagerFactory::createManagerByType('city');
+
+               // Make sure the manager instance is valid
+               assert($managerInstance instanceof ManageableCity);
+
+               // Set result instance
+               $managerInstance->setResultInstance($resultInstance);
+
+               // Has it been founded?
+               $hasFounded = $resultInstance->next();
+
+               // Return result
+               return $hasFounded;
+       }
+
+       /**
+        * Checks whether the given city name is taken
+        *
+        * @para        $cityName       Name of city
+        * @return      $isTaken        Whether the given city name is taken
+        */
+       public function ifCityExists (string $cityName) {
+               // Now get a search criteria instance
+               $searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
+
+               // Search for the city number one which is hard-coded the default
+               $searchInstance->addCriteria(CityInformationDatabaseFrontend::DB_COLUMN_CITY_NAME, $cityName);
+               $searchInstance->setLimit(1);
+
+               // Get a result back
+               $resultInstance = $this->doSelectByCriteria($searchInstance);
+
+               // Check it
+               $isTaken = $resultInstance->valid();
+
+               // Get manger instance
+               $managerInstance = ManagerFactory::createManagerByType('city');
+
+               // Make sure the instance is valid
+               assert($managerInstance instanceof ManageableCity);
+
+               // Set result instance
+               $managerInstance->setResultInstance($resultInstance);
+
+               // Return result
+               return $isTaken;
+       }
+
+       /**
+        * Creates a city from given request
+        *
+        * @para        $requestInstance        An instance of a Requestable class
+        * @return      void
+        */
+       public function createCityByRequest (Requestable $requestInstance) {
+               // Make sure all required fields are there
+               assert($requestInstance->isRequestElementSet(self::DB_COLUMN_CITY_NAME));
+               assert($requestInstance->isRequestElementSet(self::DB_COLUMN_CITY_REGION_ID));
+
+               // Get city name (to save some calls)
+               $cityName = $requestInstance->getRequestElement(self::DB_COLUMN_CITY_NAME);
+
+               // Make sure the city name is not taken yet
+               assert(!$this->ifCityExists($cityName));
+
+               // Get user instance
+               $userInstance = GenericRegistry::getRegistry()->getInstance('user');
+
+               // Get a dataset instance
+               $dataSetInstance = ObjectFactory::createObjectByConfiguredName('dataset_criteria_class', array(self::DB_TABLE_CITY_INFORMATION));
+
+               // Set the primary key
+               $dataSetInstance->setUniqueKey(self::DB_COLUMN_CITY_ID);
+
+               // Add city name and assign user id
+               $dataSetInstance->addCriteria(self::DB_COLUMN_CITY_ID       , ($this->countTotalRows() + 1));
+               $dataSetInstance->addCriteria(self::DB_COLUMN_CITY_NAME     , $cityName);
+               $dataSetInstance->addCriteria(self::DB_COLUMN_CITY_USER_ID  , $userInstance->getUserId());
+               $dataSetInstance->addCriteria(self::DB_COLUMN_CITY_REGION_ID, $requestInstance->getRequestElement(self::DB_COLUMN_CITY_REGION_ID));
+
+               // "Insert" this dataset instance completely into the database
+               $this->queryInsertDataSet($dataSetInstance);
+
+               // Post-check name
+               assert($this->ifCityExists($cityName));
+       }
+
+       /**
+        * Getter for all city ids as an array
+        *
+        * @return      $cityIds        All city ids as an array
+        */
+       public function getAllCityIds () {
+               // Init empty search instance
+               $searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
+
+               // And run it on the database
+               $resultInstance = $this->doSelectByCriteria($searchInstance);
+
+               // Init array
+               $cityIds = array();
+
+               // Anything found?
+               if ($resultInstance->count() == 0) {
+                       // Nothing found
+                       return $cityIds;
+               } // END - if
+
+               // Now get all 'city_id' columns
+               while ($resultInstance->next()) {
+                       // Get current entry
+                       $current = $resultInstance->current();
+
+                       // 'city_id' should be there
+                       assert(isset($current[self::DB_COLUMN_CITY_ID]));
+
+                       // Add it to the array
+                       array_push($cityIds, $current[self::DB_COLUMN_CITY_ID]);
+               } // END - while
+
+               // Return result
+               return $cityIds;
+       }
+}
diff --git a/application/city/classes/database/frontend/city/class_CityInformationDatabaseWrapper.php b/application/city/classes/database/frontend/city/class_CityInformationDatabaseWrapper.php
deleted file mode 100644 (file)
index 7963d17..0000000
+++ /dev/null
@@ -1,284 +0,0 @@
-<?php
-// Own namespace
-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;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
-use Org\Mxchange\CoreFramework\Registry\Registerable;
-use Org\Mxchange\CoreFramework\Request\Requestable;
-
-/**
- * A database wrapper for city informations
- *
- * @author             Roland Haeder <webmaster@shipsimu.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.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 CityInformationDatabaseWrapper extends BaseDatabaseWrapper implements CityInformationWrapper, Registerable {
-       // Constants for database table names
-       const DB_TABLE_CITY_INFORMATION = 'city_data';
-
-       // Constants for database column names
-       const DB_COLUMN_CITY_ID          = 'city_id';
-       const DB_COLUMN_CITY_MODE        = 'city_mode';
-       const DB_COLUMN_CITY_NAME        = 'city_name';
-       const DB_COLUMN_CITY_USER_ID     = 'city_user_id';
-       const DB_COLUMN_CITY_REGION_ID   = 'city_region_id';
-
-       /**
-        * Protected constructor
-        *
-        * @return      void
-        */
-       protected function __construct () {
-               // Call parent constructor
-               parent::__construct(__CLASS__);
-       }
-
-       /**
-        * Creates an instance of this database wrapper by a provided user class
-        *
-        * @return      $wrapperInstance        An instance of the created wrapper class
-        */
-       public static final function createCityInformationDatabaseWrapper () {
-               // Get a new instance
-               $wrapperInstance = new CityInformationDatabaseWrapper();
-
-               // Set (primary!) table name
-               $wrapperInstance->setTableName(self::DB_TABLE_CITY_INFORMATION);
-
-               // Return the instance
-               return $wrapperInstance;
-       }
-
-       /**
-        * Checks whether there is an entry for given city instance
-        *
-        * @param       $cityInstance   An instance of a CityHelper class
-        * @return      $isFound                Whether a city id has been found for this city
-        */
-       public function ifCityDataIsFound (CityHelper $cityInstance) {
-               // Now get a search criteria instance
-               $searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
-
-               // Search for the city number one which is hard-coded the default
-               $searchInstance->addCriteria(CityInformationDatabaseWrapper::DB_COLUMN_CITY_ID  , 1);
-               $searchInstance->addCriteria(CityInformationDatabaseWrapper::DB_COLUMN_CITY_MODE, $cityInstance->getRequestInstance()->getRequestElement('mode'));
-               $searchInstance->setLimit(1);
-
-               // Get a result back
-               $resultInstance = $this->doSelectByCriteria($searchInstance);
-
-               // Set result instance in city instance
-               $cityInstance->setResultInstance($resultInstance);
-
-               // Is it valid?
-               $isFound = $resultInstance->next();
-
-               // Return it
-               return $isFound;
-       }
-
-       /**
-        * 'Registers' a new city id along with data provided in the city instance.
-        * This may sound confusing but avoids double code very nicely...
-        *
-        * @param       $cityInstance           A city instance
-        * @param       $requestInstance        An instance of a Requestable class
-        * @return      void
-        */
-       public function registerCityId (BaseCityDaemon $cityInstance, Requestable $requestInstance) {
-               // Get a dataset instance
-               $dataSetInstance = ObjectFactory::createObjectByConfiguredName('dataset_criteria_class', array(self::DB_TABLE_CITY_INFORMATION));
-
-               // Set the primary key
-               $dataSetInstance->setUniqueKey(self::DB_COLUMN_CITY_ID);
-
-               // Add registration elements to the dataset
-               $cityInstance->addElementsToDataSet($dataSetInstance, $requestInstance);
-
-               // "Insert" this dataset instance completely into the database
-               $this->queryInsertDataSet($dataSetInstance);
-       }
-
-       /**
-        * Removes non-public data from given array.
-        *
-        * @param       $data   An array with possible non-public data that needs to be removed.
-        * @return      $data   A cleaned up array with only public data.
-        */
-       public function removeNonPublicDataFromArray(array $data) {
-               // Currently call only inner method
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CITY-WRAPPER[' . __METHOD__ . ':' . __LINE__ . ']: Calling parent::removeNonPublicDataFromArray(data) ...');
-               $data = parent::removeNonPublicDataFromArray($data);
-
-               // Return cleaned data
-               return $data;
-       }
-
-       /**
-        * Checks whether the user has already founded a city
-        *
-        * @return      $hasFounded             Whether the user has already founded a city
-        */
-       public function ifUserHasFoundedCity () {
-               // Get user instance
-               $userInstance = GenericRegistry::getRegistry()->getInstance('user');
-
-               // Now get a search criteria instance
-               $searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
-
-               // Search for user's cities
-               $searchInstance->addCriteria(CityInformationDatabaseWrapper::DB_COLUMN_CITY_USER_ID, $userInstance->getUserId());
-
-               // Get a result back
-               $resultInstance = $this->doSelectByCriteria($searchInstance);
-
-               // Get city manager instance
-               $managerInstance = ManagerFactory::createManagerByType('city');
-
-               // Make sure the manager instance is valid
-               assert($managerInstance instanceof ManageableCity);
-
-               // Set result instance
-               $managerInstance->setResultInstance($resultInstance);
-
-               // Has it been founded?
-               $hasFounded = $resultInstance->next();
-
-               // Return result
-               return $hasFounded;
-       }
-
-       /**
-        * Checks whether the given city name is taken
-        *
-        * @para        $cityName       Name of city
-        * @return      $isTaken        Whether the given city name is taken
-        */
-       public function ifCityExists ($cityName) {
-               // Now get a search criteria instance
-               $searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
-
-               // Search for the city number one which is hard-coded the default
-               $searchInstance->addCriteria(CityInformationDatabaseWrapper::DB_COLUMN_CITY_NAME, $cityName);
-               $searchInstance->setLimit(1);
-
-               // Get a result back
-               $resultInstance = $this->doSelectByCriteria($searchInstance);
-
-               // Check it
-               $isTaken = $resultInstance->valid();
-
-               // Get manger instance
-               $managerInstance = ManagerFactory::createManagerByType('city');
-
-               // Make sure the instance is valid
-               assert($managerInstance instanceof ManageableCity);
-
-               // Set result instance
-               $managerInstance->setResultInstance($resultInstance);
-
-               // Return result
-               return $isTaken;
-       }
-
-       /**
-        * Creates a city from given request
-        *
-        * @para        $requestInstance        An instance of a Requestable class
-        * @return      void
-        */
-       public function createCityByRequest (Requestable $requestInstance) {
-               // Make sure all required fields are there
-               assert($requestInstance->isRequestElementSet(self::DB_COLUMN_CITY_NAME));
-               assert($requestInstance->isRequestElementSet(self::DB_COLUMN_CITY_REGION_ID));
-
-               // Get city name (to save some calls)
-               $cityName = $requestInstance->getRequestElement(self::DB_COLUMN_CITY_NAME);
-
-               // Make sure the city name is not taken yet
-               assert(!$this->ifCityExists($cityName));
-
-               // Get user instance
-               $userInstance = GenericRegistry::getRegistry()->getInstance('user');
-
-               // Get a dataset instance
-               $dataSetInstance = ObjectFactory::createObjectByConfiguredName('dataset_criteria_class', array(self::DB_TABLE_CITY_INFORMATION));
-
-               // Set the primary key
-               $dataSetInstance->setUniqueKey(self::DB_COLUMN_CITY_ID);
-
-               // Add city name and assign user id
-               $dataSetInstance->addCriteria(self::DB_COLUMN_CITY_ID       , ($this->countTotalRows() + 1));
-               $dataSetInstance->addCriteria(self::DB_COLUMN_CITY_NAME     , $cityName);
-               $dataSetInstance->addCriteria(self::DB_COLUMN_CITY_USER_ID  , $userInstance->getUserId());
-               $dataSetInstance->addCriteria(self::DB_COLUMN_CITY_REGION_ID, $requestInstance->getRequestElement(self::DB_COLUMN_CITY_REGION_ID));
-
-               // "Insert" this dataset instance completely into the database
-               $this->queryInsertDataSet($dataSetInstance);
-
-               // Post-check name
-               assert($this->ifCityExists($cityName));
-       }
-
-       /**
-        * Getter for all city ids as an array
-        *
-        * @return      $cityIds        All city ids as an array
-        */
-       public function getAllCityIds () {
-               // Init empty search instance
-               $searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
-
-               // And run it on the database
-               $resultInstance = $this->doSelectByCriteria($searchInstance);
-
-               // Init array
-               $cityIds = array();
-
-               // Anything found?
-               if ($resultInstance->count() == 0) {
-                       // Nothing found
-                       return $cityIds;
-               } // END - if
-
-               // Now get all 'city_id' columns
-               while ($resultInstance->next()) {
-                       // Get current entry
-                       $current = $resultInstance->current();
-
-                       // 'city_id' should be there
-                       assert(isset($current[self::DB_COLUMN_CITY_ID]));
-
-                       // Add it to the array
-                       array_push($cityIds, $current[self::DB_COLUMN_CITY_ID]);
-               } // END - while
-
-               // Return result
-               return $cityIds;
-       }
-}
diff --git a/application/city/classes/database/frontend/city_entities/.htaccess b/application/city/classes/database/frontend/city_entities/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/database/frontend/city_entities/districts/.htaccess b/application/city/classes/database/frontend/city_entities/districts/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/database/frontend/city_entities/districts/class_CityDistrictsDatabaseFrontend.php b/application/city/classes/database/frontend/city_entities/districts/class_CityDistrictsDatabaseFrontend.php
new file mode 100644 (file)
index 0000000..758abf1
--- /dev/null
@@ -0,0 +1,94 @@
+<?php
+// Own namespace
+namespace Org\Mxchange\City\Database\Frontend\Districts;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Database\Frontend\BaseDatabaseFrontend;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+
+/**
+ * A database frontend for city districts
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.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.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 CityDistrictsDatabaseFrontend extends BaseDatabaseFrontend implements CityDistrictsFrontend, Registerable {
+       // Constants for database table names
+       const DB_TABLE_CITY_DISTRICTS = 'city_districts';
+
+       // Section id, an referenced city id and district id
+       const DB_COLUMN_CITY_ID                = 'city_id';
+       const DB_COLUMN_DISTRICT_ID            = 'district_id';
+
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of this database frontend by a provided user class
+        *
+        * @return      $frontendInstance       An instance of the created frontend class
+        */
+       public static final function createCityDistrictsDatabaseFrontend () {
+               // Get a new instance
+               $frontendInstance = new CityDistrictsDatabaseFrontend();
+
+               // Set (primary!) table name
+               $frontendInstance->setTableName(self::DB_TABLE_CITY_DISTRICTS);
+
+               // Return the instance
+               return $frontendInstance;
+       }
+
+       /**
+        * Checks if the given city id is found in districts table
+        *
+        * @param       $cityId         City id to check
+        * @return      $isFound        Whether the city id is found
+        */
+       public function ifCityHasDistricts (int $cityId) {
+               // Get search instance
+               $searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
+
+               // Search for 'city_id'
+               $searchInstance->addCriteria(self::DB_COLUMN_CITY_ID, $cityId);
+
+               /*
+                * Only one entry is enough to find, else this query could run very
+                * long on large maps.
+                */
+               $searchInstance->setLimit(1);
+
+               // Execute it on database instance
+               $resultInstance = $this->doSelectByCriteria($searchInstance);
+
+               // Check if there is one entry
+               $isFound = $resultInstance->next();
+
+               // Return result
+               return $isFound;
+       }
+}
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
deleted file mode 100644 (file)
index b7722a6..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-<?php
-// Own namespace
-namespace Org\Mxchange\City\Database\Frontend\Districts;
-
-// Import framework stuff
-use Org\Mxchange\CoreFramework\Database\Frontend\BaseDatabaseWrapper;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\Registerable;
-
-/**
- * A database wrapper for city districts
- *
- * @author             Roland Haeder <webmaster@shipsimu.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.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 CityDistrictsDatabaseWrapper extends BaseDatabaseWrapper implements CityDistrictsWrapper, Registerable {
-       // Constants for database table names
-       const DB_TABLE_CITY_DISTRICTS = 'city_districts';
-
-       // Section id, an referenced city id and district id
-       const DB_COLUMN_CITY_ID                = 'city_id';
-       const DB_COLUMN_DISTRICT_ID            = 'district_id';
-
-       /**
-        * Protected constructor
-        *
-        * @return      void
-        */
-       protected function __construct () {
-               // Call parent constructor
-               parent::__construct(__CLASS__);
-       }
-
-       /**
-        * Creates an instance of this database wrapper by a provided user class
-        *
-        * @return      $wrapperInstance        An instance of the created wrapper class
-        */
-       public static final function createCityDistrictsDatabaseWrapper () {
-               // Get a new instance
-               $wrapperInstance = new CityDistrictsDatabaseWrapper();
-
-               // Set (primary!) table name
-               $wrapperInstance->setTableName(self::DB_TABLE_CITY_DISTRICTS);
-
-               // Return the instance
-               return $wrapperInstance;
-       }
-
-       /**
-        * Checks if the given city id is found in districts table
-        *
-        * @param       $cityId         City id to check
-        * @return      $isFound        Whether the city id is found
-        */
-       public function ifCityHasDistricts ($cityId) {
-               // Get search instance
-               $searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
-
-               // Search for 'city_id'
-               $searchInstance->addCriteria(self::DB_COLUMN_CITY_ID, $cityId);
-
-               /*
-                * Only one entry is enough to find, else this query could run very
-                * long on large maps.
-                */
-               $searchInstance->setLimit(1);
-
-               // Execute it on database instance
-               $resultInstance = $this->doSelectByCriteria($searchInstance);
-
-               // Check if there is one entry
-               $isFound = $resultInstance->next();
-
-               // Return result
-               return $isFound;
-       }
-}
diff --git a/application/city/classes/database/frontend/city_entities/lots/.htaccess b/application/city/classes/database/frontend/city_entities/lots/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/database/frontend/city_entities/lots/class_CityLotsDatabaseFrontend.php b/application/city/classes/database/frontend/city_entities/lots/class_CityLotsDatabaseFrontend.php
new file mode 100644 (file)
index 0000000..1cf4ab5
--- /dev/null
@@ -0,0 +1,95 @@
+<?php
+// Own namespace
+namespace Org\Mxchange\City\Database\Frontend\Lots;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Database\Frontend\BaseDatabaseFrontend;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+
+/**
+ * A database frontend for city lots
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.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.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 CityLotsDatabaseFrontend extends BaseDatabaseFrontend implements CityLotsFrontend, Registerable {
+       // Constants for database table names
+       const DB_TABLE_CITY_LOTS = 'city_lots';
+
+       // Section id, an referenced city id and lot id
+       const DB_COLUMN_CITY_ID                = 'city_id';
+       const DB_COLUMN_LOT_ID                 = 'lot_id';
+       const DB_COLUMN_DISTRICT_ID            = 'district_id';
+
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of this database frontend by a provided user class
+        *
+        * @return      $frontendInstance       An instance of the created frontend class
+        */
+       public static final function createCityLotsDatabaseFrontend () {
+               // Get a new instance
+               $frontendInstance = new CityLotsDatabaseFrontend();
+
+               // Set (primary!) table name
+               $frontendInstance->setTableName(self::DB_TABLE_CITY_LOTS);
+
+               // Return the instance
+               return $frontendInstance;
+       }
+
+       /**
+        * Checks if the given city id is found in lots table
+        *
+        * @param       $cityId         City id to check
+        * @return      $isFound        Whether the city id is found
+        */
+       public function ifCityHasLots (int $cityId) {
+               // Get search instance
+               $searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
+
+               // Search for 'city_id'
+               $searchInstance->addCriteria(self::DB_COLUMN_CITY_ID, $cityId);
+
+               /*
+                * Only one entry is enough to find, else this query could run very
+                * long on large maps.
+                */
+               $searchInstance->setLimit(1);
+
+               // Execute it on database instance
+               $resultInstance = $this->doSelectByCriteria($searchInstance);
+
+               // Check if there is one entry
+               $isFound = $resultInstance->next();
+
+               // Return result
+               return $isFound;
+       }
+}
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
deleted file mode 100644 (file)
index 9f07157..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-<?php
-// Own namespace
-namespace Org\Mxchange\City\Database\Frontend\Lots;
-
-// Import framework stuff
-use Org\Mxchange\CoreFramework\Database\Frontend\BaseDatabaseWrapper;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\Registerable;
-
-/**
- * A database wrapper for city lots
- *
- * @author             Roland Haeder <webmaster@shipsimu.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.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 CityLotsDatabaseWrapper extends BaseDatabaseWrapper implements CityLotsWrapper, Registerable {
-       // Constants for database table names
-       const DB_TABLE_CITY_LOTS = 'city_lots';
-
-       // Section id, an referenced city id and lot id
-       const DB_COLUMN_CITY_ID                = 'city_id';
-       const DB_COLUMN_LOT_ID                 = 'lot_id';
-       const DB_COLUMN_DISTRICT_ID            = 'district_id';
-
-       /**
-        * Protected constructor
-        *
-        * @return      void
-        */
-       protected function __construct () {
-               // Call parent constructor
-               parent::__construct(__CLASS__);
-       }
-
-       /**
-        * Creates an instance of this database wrapper by a provided user class
-        *
-        * @return      $wrapperInstance        An instance of the created wrapper class
-        */
-       public static final function createCityLotsDatabaseWrapper () {
-               // Get a new instance
-               $wrapperInstance = new CityLotsDatabaseWrapper();
-
-               // Set (primary!) table name
-               $wrapperInstance->setTableName(self::DB_TABLE_CITY_LOTS);
-
-               // Return the instance
-               return $wrapperInstance;
-       }
-
-       /**
-        * Checks if the given city id is found in lots table
-        *
-        * @param       $cityId         City id to check
-        * @return      $isFound        Whether the city id is found
-        */
-       public function ifCityHasLots ($cityId) {
-               // Get search instance
-               $searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
-
-               // Search for 'city_id'
-               $searchInstance->addCriteria(self::DB_COLUMN_CITY_ID, $cityId);
-
-               /*
-                * Only one entry is enough to find, else this query could run very
-                * long on large maps.
-                */
-               $searchInstance->setLimit(1);
-
-               // Execute it on database instance
-               $resultInstance = $this->doSelectByCriteria($searchInstance);
-
-               // Check if there is one entry
-               $isFound = $resultInstance->next();
-
-               // Return result
-               return $isFound;
-       }
-}
diff --git a/application/city/classes/database/frontend/city_entities/sections/.htaccess b/application/city/classes/database/frontend/city_entities/sections/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/database/frontend/city_entities/sections/class_CitySectionsDatabaseFrontend.php b/application/city/classes/database/frontend/city_entities/sections/class_CitySectionsDatabaseFrontend.php
new file mode 100644 (file)
index 0000000..dc4004f
--- /dev/null
@@ -0,0 +1,274 @@
+<?php
+// Own namespace
+namespace Org\Mxchange\City\Database\Frontend\Sections;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
+use Org\Mxchange\CoreFramework\Database\Frontend\BaseDatabaseFrontend;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+
+/**
+ * A database frontend for city sections. Sections are the smalles entity of a
+ * city. They can be connected with each other and form a lot. Therefore only
+ * sections of same type (and sub type) can be linked combined, else you will
+ * something really strange, a residential building with some industry parts
+ * for example is not possible in real world.
+ *
+ * Sure you can have a small shop (commercial) on ground level and some
+ * residentials on higher levels. This city simulation does support such
+ * creations as the levels (Z axis) is different.
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.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.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 CitySectionsDatabaseFrontend extends BaseDatabaseFrontend implements CitySectionsFrontend, Registerable {
+       // Constants for database table names
+       const DB_TABLE_CITY_SECTIONS           = 'city_sections';
+
+       // Entry id
+       const DB_COLUMN_ENTRY_ID               = 'entry_id';
+
+       // Section id, an referenced city id and lot id
+       const DB_COLUMN_SECTION_ID             = 'city_section_id';
+       const DB_COLUMN_CITY_ID                = 'city_id';
+
+       /*
+        * Lot id, the lot id is only set if the player has "aquired" the sections
+        * and has created a lot based on these sections.
+        */
+       const DB_COLUMN_LOT_ID                 = 'lot_id';
+
+       // Section and sub type (e.g. residential, hut)
+       const DB_COLUMN_SECTION_TYPE           = 'section_type';
+       const DB_COLUMN_SECTION_SUB_TYPE       = 'section_sub_type';
+
+       // X-Y-Z position
+       const DB_COLUMN_SECTION_POSITION_X     = 'section_position_x';
+       const DB_COLUMN_SECTION_POSITION_Y     = 'section_position_y';
+       const DB_COLUMN_SECTION_POSITION_Z     = 'section_position_z';
+
+       // Connected neigbouring sections
+       const DB_COLUMN_SECTION_NEIGHBOUR_WEST_ID  = 'section_neighbour_west_id';
+       const DB_COLUMN_SECTION_NEIGHBOUR_EAST_ID  = 'section_neighbour_east_id';
+       const DB_COLUMN_SECTION_NEIGHBOUR_NORTH_ID = 'section_neighbour_north_id';
+       const DB_COLUMN_SECTION_NEIGHBOUR_SOUTH_ID = 'section_neighbour_south_id';
+       const DB_COLUMN_SECTION_NEIGHBOUR_UP_ID    = 'section_neighbour_up_id';
+       const DB_COLUMN_SECTION_NEIGHBOUR_DOWN_ID  = 'section_neighbour_down_id';
+
+       // Other settings:
+       // Reserved section (see documentation)
+       const DB_COLUMN_SECTION_RESERVED       = 'section_reserved';
+
+       // Section types
+       // @TODO "water" is not yet supported and may end up in a very random land.
+       const SECTION_TYPE_WATER      = 'water';
+       const SECTION_TYPE_EMPTY_LAND = 'land';
+       const SECTION_TYPE_AIR        = 'air';
+
+       // Sub sections
+       // @TODO All types of water are not supported yet.
+       const SECTION_SUB_TYPE_GRASS = 'grass';
+       const SECTION_SUB_TYPE_AIR   = 'air';
+
+       // Reserved flag
+       const IS_NOT_RESERVED = 0;
+       const IS_RESERVED     = 1;
+
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of this database frontend by a provided user class
+        *
+        * @return      $frontendInstance       An instance of the created frontend class
+        */
+       public static final function createCitySectionsDatabaseFrontend () {
+               // Get a new instance
+               $frontendInstance = new CitySectionsDatabaseFrontend();
+
+               // Set (primary!) table name
+               $frontendInstance->setTableName(self::DB_TABLE_CITY_SECTIONS);
+
+               // Return the instance
+               return $frontendInstance;
+       }
+
+       /**
+        * Checks if the given city id is found in sections table
+        *
+        * @param       $cityId         City id to check
+        * @return      $isFound        Whether the city id is found
+        */
+       public function ifCityHasSections (int $cityId) {
+               // Get search instance
+               $searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
+
+               // Search for 'city_id'
+               $searchInstance->addCriteria(self::DB_COLUMN_CITY_ID, $cityId);
+
+               /*
+                * Only one entry is enough to find, else this query could run very
+                * long on large maps.
+                */
+               $searchInstance->setLimit(1);
+
+               // Execute it on database instance
+               $resultInstance = $this->doSelectByCriteria($searchInstance);
+
+               // Check if there is one entry
+               $isFound = $resultInstance->next();
+
+               // Return result
+               return $isFound;
+       }
+
+       /**
+        * Expands the sections table with initial data for given city id
+        *
+        * @param       $cityId         City id to check
+        * @return      $ids            Sections ids from initial expansion
+        * @todo        Add handling of water types to make a more cooler map
+        */
+       public function doInitialCityExpansion (int $cityId) {
+               // Make sure this city has no sections
+               assert(!$this->ifCityHasSections($cityId));
+
+               /*
+                * "Cache" max "radius" for initial city expansion. It is not a real
+                * radius but more a max expansion area (expand +- half of "radius"
+                * from 0/0). The "zero point" is always calculated in.
+                *
+                * This gives a maxium initial area calculated as follows:
+                *
+                * totalInitialSections = (radius + 1) * (radius + 1)
+                */
+               $radius = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('city_max_initial_xy_expansion_radius');
+
+               // Max up and down ...
+               $maxUp   = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('city_max_initial_up_expansion');
+               $maxDown = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('city_max_initial_down_expansion');
+
+               // Calculate total sections
+               $totalSections = (($radius + 1) * ($radius + 1) * $maxUp * ($maxDown + 1));
+
+               // Debug message:
+               /* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: radius=' . $radius . ',maxUp=' . $maxUp . ',maxDown=' . $maxDown . ',totalSections=' . $totalSections);
+
+               // Get data set instance
+               $dataSetInstance = ObjectFactory::createObjectByConfiguredName('dataset_criteria_class', array(self::DB_TABLE_CITY_SECTIONS));
+
+               // Add values for "zero point"
+               $dataSetInstance->addCriteria(self::DB_COLUMN_SECTION_ID                , 1);
+               $dataSetInstance->addCriteria(self::DB_COLUMN_CITY_ID                   , $cityId);
+               $dataSetInstance->addCriteria(self::DB_COLUMN_LOT_ID                    , 0);
+               $dataSetInstance->addCriteria(self::DB_COLUMN_SECTION_TYPE              , self::SECTION_TYPE_AIR);
+               $dataSetInstance->addCriteria(self::DB_COLUMN_SECTION_SUB_TYPE          , self::SECTION_SUB_TYPE_AIR);
+               $dataSetInstance->addCriteria(self::DB_COLUMN_SECTION_POSITION_X        , 0);
+               $dataSetInstance->addCriteria(self::DB_COLUMN_SECTION_POSITION_Y        , 0);
+               $dataSetInstance->addCriteria(self::DB_COLUMN_SECTION_POSITION_Z        , 0);
+               $dataSetInstance->addCriteria(self::DB_COLUMN_SECTION_NEIGHBOUR_NORTH_ID, 0);
+               $dataSetInstance->addCriteria(self::DB_COLUMN_SECTION_NEIGHBOUR_SOUTH_ID, 0);
+               $dataSetInstance->addCriteria(self::DB_COLUMN_SECTION_NEIGHBOUR_WEST_ID , 0);
+               $dataSetInstance->addCriteria(self::DB_COLUMN_SECTION_NEIGHBOUR_EAST_ID , 0);
+               $dataSetInstance->addCriteria(self::DB_COLUMN_SECTION_NEIGHBOUR_UP_ID   , 0);
+               $dataSetInstance->addCriteria(self::DB_COLUMN_SECTION_NEIGHBOUR_DOWN_ID , 0);
+               $dataSetInstance->addCriteria(self::DB_COLUMN_SECTION_RESERVED          , self::IS_NOT_RESERVED);
+
+               // Set primary key to 'city_id'/'section_id'
+               $dataSetInstance->setPrimaryKeyCombined(array(self::DB_COLUMN_CITY_ID, self::DB_COLUMN_SECTION_ID));
+
+               // Entry id for counting each entry
+               $dataSetInstance->setUniqueKey(self::DB_COLUMN_ENTRY_ID);
+
+               // Add "zero point"
+               $this->queryInsertDataSet($dataSetInstance);
+
+               // Set section id to 2 as 1 is already initialized + init array
+               $sections = array();
+
+               // Output message to ask for user's patience ...
+               self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: Writing ' . $totalSections . ' sections for city ' . $cityId . ' ... (this may takes some time)');
+
+               // Expand half of it to north/south (north=positive, south=negative)
+               for ($north = 1; $north < round($radius / 2); $north++) {
+                       // Expand half of it to west/east (west=positive, east=negative)
+                       for ($west = 1; $west < round($radius / 2); $west++) {
+                               // Expand up/down (including "zero point")
+                               for ($z = $maxDown; $z < ($maxUp + 1); $z++) {
+                                       // Debug message
+                                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: north=' . $north . ',west=' . $west . ',z=' . $z);
+
+                                       // Fill array up with south/east/down ids
+                                       $sections[($north * -1)][($west * -1)][$z]['type'] = self::SECTION_TYPE_EMPTY_LAND;
+                                       $sections[($north * -1)][($west * -1)][$z]['sub']  = self::SECTION_SUB_TYPE_GRASS;
+
+                                       // Fill up array with north/west/up ids (only air)
+                                       $sections[$north][$west][$z]['type'] = self::SECTION_TYPE_AIR;
+                                       $sections[$north][$west][$z]['sub']  = self::SECTION_SUB_TYPE_AIR;
+                               } // END - for
+                       } // END - for
+               } // END - for
+
+               // Init section id with 2 as 1 is the "zero point"
+               $sectionId = 2;
+
+               // Loop through whole array again for writing it to database: north/south
+               foreach ($sections as $x => $sectionX) {
+                       // Loop through west/east values
+                       foreach ($sectionX as $y => $sectionY) {
+                               // Loop through up/down values
+                               foreach ($sectionY as $z => $sectionData) {
+                                       // Debug message
+                                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: x=' . $x . ',y=' . $y . ',z=' . $z . ',sectionId=' . $sectionId);
+
+                                       // Set all coordinates for positive directions
+                                       $dataSetInstance->setCriteria(self::DB_COLUMN_SECTION_ID        , $sectionId);
+                                       $dataSetInstance->setCriteria(self::DB_COLUMN_SECTION_POSITION_X, $x);
+                                       $dataSetInstance->setCriteria(self::DB_COLUMN_SECTION_POSITION_Y, $y);
+                                       $dataSetInstance->setCriteria(self::DB_COLUMN_SECTION_POSITION_Z, $z);
+                                       $dataSetInstance->setCriteria(self::DB_COLUMN_SECTION_TYPE      , $sectionData['type']);
+                                       $dataSetInstance->setCriteria(self::DB_COLUMN_SECTION_SUB_TYPE  , $sectionData['sub']);
+
+                                       // Add value to database
+                                       $this->queryInsertDataSet($dataSetInstance);
+
+                                       // Count id up
+                                       $sectionId++;
+                               } // END - foreach
+
+                               // Debug message
+                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: x=' . $x . ',y=' . $y . ' has been written.');
+                       } // END - foreach
+
+                       // Debug message
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: x=' . $x . ' has been written.');
+               } // END - foreach
+
+               // Thank you for waiting! :-)
+               self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: A total of ' . $totalSections . ' sections has been written for city id ' . $cityId . '.');
+       }
+}
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
deleted file mode 100644 (file)
index 2b4d671..0000000
+++ /dev/null
@@ -1,274 +0,0 @@
-<?php
-// Own namespace
-namespace Org\Mxchange\City\Database\Frontend\Sections;
-
-// Import framework stuff
-use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
-use Org\Mxchange\CoreFramework\Database\Frontend\BaseDatabaseWrapper;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\Registerable;
-
-/**
- * A database wrapper for city sections. Sections are the smalles entity of a
- * city. They can be connected with each other and form a lot. Therefore only
- * sections of same type (and sub type) can be linked combined, else you will
- * something really strange, a residential building with some industry parts
- * for example is not possible in real world.
- *
- * Sure you can have a small shop (commercial) on ground level and some
- * residentials on higher levels. This city simulation does support such
- * creations as the levels (Z axis) is different.
- *
- * @author             Roland Haeder <webmaster@shipsimu.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.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 CitySectionsDatabaseWrapper extends BaseDatabaseWrapper implements CitySectionsWrapper, Registerable {
-       // Constants for database table names
-       const DB_TABLE_CITY_SECTIONS           = 'city_sections';
-
-       // Entry id
-       const DB_COLUMN_ENTRY_ID               = 'entry_id';
-
-       // Section id, an referenced city id and lot id
-       const DB_COLUMN_SECTION_ID             = 'city_section_id';
-       const DB_COLUMN_CITY_ID                = 'city_id';
-
-       /*
-        * Lot id, the lot id is only set if the player has "aquired" the sections
-        * and has created a lot based on these sections.
-        */
-       const DB_COLUMN_LOT_ID                 = 'lot_id';
-
-       // Section and sub type (e.g. residential, hut)
-       const DB_COLUMN_SECTION_TYPE           = 'section_type';
-       const DB_COLUMN_SECTION_SUB_TYPE       = 'section_sub_type';
-
-       // X-Y-Z position
-       const DB_COLUMN_SECTION_POSITION_X     = 'section_position_x';
-       const DB_COLUMN_SECTION_POSITION_Y     = 'section_position_y';
-       const DB_COLUMN_SECTION_POSITION_Z     = 'section_position_z';
-
-       // Connected neigbouring sections
-       const DB_COLUMN_SECTION_NEIGHBOUR_WEST_ID  = 'section_neighbour_west_id';
-       const DB_COLUMN_SECTION_NEIGHBOUR_EAST_ID  = 'section_neighbour_east_id';
-       const DB_COLUMN_SECTION_NEIGHBOUR_NORTH_ID = 'section_neighbour_north_id';
-       const DB_COLUMN_SECTION_NEIGHBOUR_SOUTH_ID = 'section_neighbour_south_id';
-       const DB_COLUMN_SECTION_NEIGHBOUR_UP_ID    = 'section_neighbour_up_id';
-       const DB_COLUMN_SECTION_NEIGHBOUR_DOWN_ID  = 'section_neighbour_down_id';
-
-       // Other settings:
-       // Reserved section (see documentation)
-       const DB_COLUMN_SECTION_RESERVED       = 'section_reserved';
-
-       // Section types
-       // @TODO "water" is not yet supported and may end up in a very random land.
-       const SECTION_TYPE_WATER      = 'water';
-       const SECTION_TYPE_EMPTY_LAND = 'land';
-       const SECTION_TYPE_AIR        = 'air';
-
-       // Sub sections
-       // @TODO All types of water are not supported yet.
-       const SECTION_SUB_TYPE_GRASS = 'grass';
-       const SECTION_SUB_TYPE_AIR   = 'air';
-
-       // Reserved flag
-       const IS_NOT_RESERVED = 0;
-       const IS_RESERVED     = 1;
-
-       /**
-        * Protected constructor
-        *
-        * @return      void
-        */
-       protected function __construct () {
-               // Call parent constructor
-               parent::__construct(__CLASS__);
-       }
-
-       /**
-        * Creates an instance of this database wrapper by a provided user class
-        *
-        * @return      $wrapperInstance        An instance of the created wrapper class
-        */
-       public static final function createCitySectionsDatabaseWrapper () {
-               // Get a new instance
-               $wrapperInstance = new CitySectionsDatabaseWrapper();
-
-               // Set (primary!) table name
-               $wrapperInstance->setTableName(self::DB_TABLE_CITY_SECTIONS);
-
-               // Return the instance
-               return $wrapperInstance;
-       }
-
-       /**
-        * Checks if the given city id is found in sections table
-        *
-        * @param       $cityId         City id to check
-        * @return      $isFound        Whether the city id is found
-        */
-       public function ifCityHasSections ($cityId) {
-               // Get search instance
-               $searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
-
-               // Search for 'city_id'
-               $searchInstance->addCriteria(self::DB_COLUMN_CITY_ID, $cityId);
-
-               /*
-                * Only one entry is enough to find, else this query could run very
-                * long on large maps.
-                */
-               $searchInstance->setLimit(1);
-
-               // Execute it on database instance
-               $resultInstance = $this->doSelectByCriteria($searchInstance);
-
-               // Check if there is one entry
-               $isFound = $resultInstance->next();
-
-               // Return result
-               return $isFound;
-       }
-
-       /**
-        * Expands the sections table with initial data for given city id
-        *
-        * @param       $cityId         City id to check
-        * @return      $ids            Sections ids from initial expansion
-        * @todo        Add handling of water types to make a more cooler map
-        */
-       public function doInitialCityExpansion ($cityId) {
-               // Make sure this city has no sections
-               assert(!$this->ifCityHasSections($cityId));
-
-               /*
-                * "Cache" max "radius" for initial city expansion. It is not a real
-                * radius but more a max expansion area (expand +- half of "radius"
-                * from 0/0). The "zero point" is always calculated in.
-                *
-                * This gives a maxium initial area calculated as follows:
-                *
-                * totalInitialSections = (radius + 1) * (radius + 1)
-                */
-               $radius = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('city_max_initial_xy_expansion_radius');
-
-               // Max up and down ...
-               $maxUp   = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('city_max_initial_up_expansion');
-               $maxDown = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('city_max_initial_down_expansion');
-
-               // Calculate total sections
-               $totalSections = (($radius + 1) * ($radius + 1) * $maxUp * ($maxDown + 1));
-
-               // Debug message:
-               /* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: radius=' . $radius . ',maxUp=' . $maxUp . ',maxDown=' . $maxDown . ',totalSections=' . $totalSections);
-
-               // Get data set instance
-               $dataSetInstance = ObjectFactory::createObjectByConfiguredName('dataset_criteria_class', array(self::DB_TABLE_CITY_SECTIONS));
-
-               // Add values for "zero point"
-               $dataSetInstance->addCriteria(self::DB_COLUMN_SECTION_ID                , 1);
-               $dataSetInstance->addCriteria(self::DB_COLUMN_CITY_ID                   , $cityId);
-               $dataSetInstance->addCriteria(self::DB_COLUMN_LOT_ID                    , 0);
-               $dataSetInstance->addCriteria(self::DB_COLUMN_SECTION_TYPE              , self::SECTION_TYPE_AIR);
-               $dataSetInstance->addCriteria(self::DB_COLUMN_SECTION_SUB_TYPE          , self::SECTION_SUB_TYPE_AIR);
-               $dataSetInstance->addCriteria(self::DB_COLUMN_SECTION_POSITION_X        , 0);
-               $dataSetInstance->addCriteria(self::DB_COLUMN_SECTION_POSITION_Y        , 0);
-               $dataSetInstance->addCriteria(self::DB_COLUMN_SECTION_POSITION_Z        , 0);
-               $dataSetInstance->addCriteria(self::DB_COLUMN_SECTION_NEIGHBOUR_NORTH_ID, 0);
-               $dataSetInstance->addCriteria(self::DB_COLUMN_SECTION_NEIGHBOUR_SOUTH_ID, 0);
-               $dataSetInstance->addCriteria(self::DB_COLUMN_SECTION_NEIGHBOUR_WEST_ID , 0);
-               $dataSetInstance->addCriteria(self::DB_COLUMN_SECTION_NEIGHBOUR_EAST_ID , 0);
-               $dataSetInstance->addCriteria(self::DB_COLUMN_SECTION_NEIGHBOUR_UP_ID   , 0);
-               $dataSetInstance->addCriteria(self::DB_COLUMN_SECTION_NEIGHBOUR_DOWN_ID , 0);
-               $dataSetInstance->addCriteria(self::DB_COLUMN_SECTION_RESERVED          , self::IS_NOT_RESERVED);
-
-               // Set primary key to 'city_id'/'section_id'
-               $dataSetInstance->setPrimaryKeyCombined(array(self::DB_COLUMN_CITY_ID, self::DB_COLUMN_SECTION_ID));
-
-               // Entry id for counting each entry
-               $dataSetInstance->setUniqueKey(self::DB_COLUMN_ENTRY_ID);
-
-               // Add "zero point"
-               $this->queryInsertDataSet($dataSetInstance);
-
-               // Set section id to 2 as 1 is already initialized + init array
-               $sections = array();
-
-               // Output message to ask for user's patience ...
-               self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: Writing ' . $totalSections . ' sections for city ' . $cityId . ' ... (this may takes some time)');
-
-               // Expand half of it to north/south (north=positive, south=negative)
-               for ($north = 1; $north < round($radius / 2); $north++) {
-                       // Expand half of it to west/east (west=positive, east=negative)
-                       for ($west = 1; $west < round($radius / 2); $west++) {
-                               // Expand up/down (including "zero point")
-                               for ($z = $maxDown; $z < ($maxUp + 1); $z++) {
-                                       // Debug message
-                                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: north=' . $north . ',west=' . $west . ',z=' . $z);
-
-                                       // Fill array up with south/east/down ids
-                                       $sections[($north * -1)][($west * -1)][$z]['type'] = self::SECTION_TYPE_EMPTY_LAND;
-                                       $sections[($north * -1)][($west * -1)][$z]['sub']  = self::SECTION_SUB_TYPE_GRASS;
-
-                                       // Fill up array with north/west/up ids (only air)
-                                       $sections[$north][$west][$z]['type'] = self::SECTION_TYPE_AIR;
-                                       $sections[$north][$west][$z]['sub']  = self::SECTION_SUB_TYPE_AIR;
-                               } // END - for
-                       } // END - for
-               } // END - for
-
-               // Init section id with 2 as 1 is the "zero point"
-               $sectionId = 2;
-
-               // Loop through whole array again for writing it to database: north/south
-               foreach ($sections as $x => $sectionX) {
-                       // Loop through west/east values
-                       foreach ($sectionX as $y => $sectionY) {
-                               // Loop through up/down values
-                               foreach ($sectionY as $z => $sectionData) {
-                                       // Debug message
-                                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: x=' . $x . ',y=' . $y . ',z=' . $z . ',sectionId=' . $sectionId);
-
-                                       // Set all coordinates for positive directions
-                                       $dataSetInstance->setCriteria(self::DB_COLUMN_SECTION_ID        , $sectionId);
-                                       $dataSetInstance->setCriteria(self::DB_COLUMN_SECTION_POSITION_X, $x);
-                                       $dataSetInstance->setCriteria(self::DB_COLUMN_SECTION_POSITION_Y, $y);
-                                       $dataSetInstance->setCriteria(self::DB_COLUMN_SECTION_POSITION_Z, $z);
-                                       $dataSetInstance->setCriteria(self::DB_COLUMN_SECTION_TYPE      , $sectionData['type']);
-                                       $dataSetInstance->setCriteria(self::DB_COLUMN_SECTION_SUB_TYPE  , $sectionData['sub']);
-
-                                       // Add value to database
-                                       $this->queryInsertDataSet($dataSetInstance);
-
-                                       // Count id up
-                                       $sectionId++;
-                               } // END - foreach
-
-                               // Debug message
-                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: x=' . $x . ',y=' . $y . ' has been written.');
-                       } // END - foreach
-
-                       // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: x=' . $x . ' has been written.');
-               } // END - foreach
-
-               // Thank you for waiting! :-)
-               self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: A total of ' . $totalSections . ' sections has been written for city id ' . $cityId . '.');
-       }
-}
diff --git a/application/city/classes/database/frontend/game_options/.htaccess b/application/city/classes/database/frontend/game_options/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/database/frontend/game_options/class_CityGameOptionsDatabaseFrontend.php b/application/city/classes/database/frontend/game_options/class_CityGameOptionsDatabaseFrontend.php
new file mode 100644 (file)
index 0000000..956cac2
--- /dev/null
@@ -0,0 +1,65 @@
+<?php
+// Own namespace
+namespace Org\Mxchange\City\Database\Frontend\GameOptions;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Database\Frontend\BaseDatabaseFrontend;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+
+/**
+ * A database frontend for game options
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.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.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 CityGameOptionsDatabaseFrontend extends BaseDatabaseFrontend implements CityGameOptionsFrontend, Registerable {
+       // Constants for database table names
+       const DB_TABLE_GAME_OPTION_INFORMATION = 'game_options';
+
+       // Constants for database column names
+       const DB_COLUMN_GAME_OPTION_ID          = 'game_id';
+       const DB_COLUMN_GAME_OPTION_USER_ID     = 'game_user_id';
+       const DB_COLUMN_GAME_OPTION_FLAG_PAUSED = 'game_flag_paused';
+
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of this database frontend by a provided user class
+        *
+        * @return      $frontendInstance       An instance of the created frontend class
+        */
+       public static final function createCityGameOptionsDatabaseFrontend () {
+               // Get a new instance
+               $frontendInstance = new CityGameOptionsDatabaseFrontend();
+
+               // Set (primary!) table name
+               $frontendInstance->setTableName(self::DB_TABLE_GAME_OPTION_INFORMATION);
+
+               // Return the instance
+               return $frontendInstance;
+       }
+}
diff --git a/application/city/classes/database/frontend/game_options/class_CityGameOptionsDatabaseWrapper.php b/application/city/classes/database/frontend/game_options/class_CityGameOptionsDatabaseWrapper.php
deleted file mode 100644 (file)
index 4250491..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-<?php
-// Own namespace
-namespace Org\Mxchange\City\Database\Frontend\GameOptions;
-
-// Import framework stuff
-use Org\Mxchange\CoreFramework\Database\Frontend\BaseDatabaseWrapper;
-use Org\Mxchange\CoreFramework\Registry\Registerable;
-
-/**
- * A database wrapper for game options
- *
- * @author             Roland Haeder <webmaster@shipsimu.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.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 CityGameOptionsDatabaseWrapper extends BaseDatabaseWrapper implements CityGameOptionsWrapper, Registerable {
-       // Constants for database table names
-       const DB_TABLE_GAME_OPTION_INFORMATION = 'game_options';
-
-       // Constants for database column names
-       const DB_COLUMN_GAME_OPTION_ID          = 'game_id';
-       const DB_COLUMN_GAME_OPTION_USER_ID     = 'game_user_id';
-       const DB_COLUMN_GAME_OPTION_FLAG_PAUSED = 'game_flag_paused';
-
-       /**
-        * Protected constructor
-        *
-        * @return      void
-        */
-       protected function __construct () {
-               // Call parent constructor
-               parent::__construct(__CLASS__);
-       }
-
-       /**
-        * Creates an instance of this database wrapper by a provided user class
-        *
-        * @return      $wrapperInstance        An instance of the created wrapper class
-        */
-       public static final function createCityGameOptionsDatabaseWrapper () {
-               // Get a new instance
-               $wrapperInstance = new CityGameOptionsDatabaseWrapper();
-
-               // Set (primary!) table name
-               $wrapperInstance->setTableName(self::DB_TABLE_GAME_OPTION_INFORMATION);
-
-               // Return the instance
-               return $wrapperInstance;
-       }
-}
diff --git a/application/city/classes/database/frontend/region/.htaccess b/application/city/classes/database/frontend/region/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
index 3938f9357c8cc707b9388ce7a8785fe98c6ac902..a670a212d4bb9c2c63e447a5ff965ced7727b327 100644 (file)
@@ -6,13 +6,13 @@ namespace Org\Mxchange\City\Database\Frontend\RegionInformation;
 use Org\Mxchange\City\Factory\Manager\ManagerFactory;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Database\Frontend\BaseDatabaseWrapper;
+use Org\Mxchange\CoreFramework\Database\Frontend\BaseDatabaseFrontend;
 use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 use Org\Mxchange\CoreFramework\Registry\Registerable;
 
 /**
- * A database wrapper for region informations
+ * A database frontend for region informations
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
@@ -33,7 +33,7 @@ use Org\Mxchange\CoreFramework\Registry\Registerable;
  * 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 RegionInformationDatabaseWrapper extends BaseDatabaseWrapper implements RegionInformationWrapper, Registerable {
+class RegionInformationDatabaseFrontend extends BaseDatabaseFrontend implements RegionInformationFrontend, Registerable {
        // Constants for database table names
        const DB_TABLE_REGION_INFORMATION = 'region_data';
 
@@ -53,19 +53,19 @@ class RegionInformationDatabaseWrapper extends BaseDatabaseWrapper implements Re
        }
 
        /**
-        * Creates an instance of this database wrapper by a provided user class
+        * Creates an instance of this database frontend by a provided user class
         *
-        * @return      $wrapperInstance        An instance of the created wrapper class
+        * @return      $frontendInstance       An instance of the created frontend class
         */
-       public static final function createRegionInformationDatabaseWrapper () {
+       public static final function createRegionInformationDatabaseFrontend () {
                // Get a new instance
-               $wrapperInstance = new RegionInformationDatabaseWrapper();
+               $frontendInstance = new RegionInformationDatabaseFrontend();
 
                // Set (primary!) table name
-               $wrapperInstance->setTableName(self::DB_TABLE_REGION_INFORMATION);
+               $frontendInstance->setTableName(self::DB_TABLE_REGION_INFORMATION);
 
                // Return the instance
-               return $wrapperInstance;
+               return $frontendInstance;
        }
 
        /**
@@ -96,7 +96,7 @@ class RegionInformationDatabaseWrapper extends BaseDatabaseWrapper implements Re
                $searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
 
                // Search for user's cities
-               $searchInstance->addCriteria(RegionInformationDatabaseWrapper::DB_COLUMN_REGION_USER_ID, $userInstance->getUserId());
+               $searchInstance->addCriteria(RegionInformationDatabaseFrontend::DB_COLUMN_REGION_USER_ID, $userInstance->getUserId());
 
                // Get a result back
                $resultInstance = $this->doSelectByCriteria($searchInstance);
@@ -128,7 +128,7 @@ class RegionInformationDatabaseWrapper extends BaseDatabaseWrapper implements Re
                $searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
 
                // Search for the region number one which is hard-coded the default
-               $searchInstance->addCriteria(RegionInformationDatabaseWrapper::DB_COLUMN_REGION_NAME, $regionName);
+               $searchInstance->addCriteria(RegionInformationDatabaseFrontend::DB_COLUMN_REGION_NAME, $regionName);
                $searchInstance->setLimit(1);
 
                // Get a result back
diff --git a/application/city/classes/database/frontend/region_map/.htaccess b/application/city/classes/database/frontend/region_map/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/database/frontend/region_map/class_RegionMapDatabaseFrontend.php b/application/city/classes/database/frontend/region_map/class_RegionMapDatabaseFrontend.php
new file mode 100644 (file)
index 0000000..6ddbdba
--- /dev/null
@@ -0,0 +1,109 @@
+<?php
+// Own namespace
+namespace Org\Mxchange\City\Database\Frontend\Region;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Database\Frontend\BaseDatabaseFrontend;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+
+/**
+ * A database frontend for region maps
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.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.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 RegionMapDatabaseFrontend extends BaseDatabaseFrontend implements RegionMapFrontend, Registerable {
+       // Constants for database table names
+       const DB_TABLE_REGION_MAP = 'region_map';
+
+       // Constants for database column names
+       const DB_COLUMN_REGION_ID = 'region_id';
+
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of this database frontend by a provided user class
+        *
+        * @return      $frontendInstance       An instance of the created frontend class
+        */
+       public static final function createRegionMapDatabaseFrontend () {
+               // Get a new instance
+               $frontendInstance = new RegionMapDatabaseFrontend();
+
+               // Set (primary!) table name
+               $frontendInstance->setTableName(self::DB_TABLE_REGION_MAP);
+
+               // Return the instance
+               return $frontendInstance;
+       }
+
+       /**
+        * Removes non-public data from given array.
+        *
+        * @param       $data   An array with possible non-public data that needs to be removed.
+        * @return      $data   A cleaned up array with only public data.
+        */
+       public function removeNonPublicDataFromArray(array $data) {
+               // Currently call only inner method
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('REGION-WRAPPER[' . __METHOD__ . ':' . __LINE__ . ']: Calling parent::removeNonPublicDataFromArray(data) ...');
+               $data = parent::removeNonPublicDataFromArray($data);
+
+               // Return cleaned data
+               return $data;
+       }
+
+       /**
+        * Creates a region by given name
+        *
+        * @return      void
+        */
+       public function createRegionByName () {
+               // Pre-check
+               die(__METHOD__ . ': Unfinshed!');
+               assert(!$this->ifRegionExists($regionName));
+
+               // Get user instance
+               $userInstance = GenericRegistry::getRegistry()->getInstance('user');
+
+               // Get a dataset instance
+               $dataSetInstance = ObjectFactory::createObjectByConfiguredName('dataset_criteria_class', array(self::DB_TABLE_REGION_MAP));
+
+               // Set the primary key
+               $dataSetInstance->setUniqueKey(self::DB_COLUMN_REGION_ID);
+
+               // Add region name and assign user id
+               $dataSetInstance->addCriteria(self::DB_COLUMN_REGION_ID     , ($this->countTotalRows() + 1));
+
+               // "Insert" this dataset instance completely into the database
+               $this->queryInsertDataSet($dataSetInstance);
+
+               // Post-check name
+               assert($this->ifRegionExists($regionName));
+       }
+}
diff --git a/application/city/classes/database/frontend/region_map/class_RegionMapDatabaseWrapper.php b/application/city/classes/database/frontend/region_map/class_RegionMapDatabaseWrapper.php
deleted file mode 100644 (file)
index 9c2a2c2..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-<?php
-// Own namespace
-namespace Org\Mxchange\City\Database\Frontend\Region;
-
-// Import framework stuff
-use Org\Mxchange\CoreFramework\Database\Frontend\BaseDatabaseWrapper;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
-use Org\Mxchange\CoreFramework\Registry\Registerable;
-
-/**
- * A database wrapper for region maps
- *
- * @author             Roland Haeder <webmaster@shipsimu.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.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 RegionMapDatabaseWrapper extends BaseDatabaseWrapper implements RegionMapWrapper, Registerable {
-       // Constants for database table names
-       const DB_TABLE_REGION_MAP = 'region_map';
-
-       // Constants for database column names
-       const DB_COLUMN_REGION_ID = 'region_id';
-
-       /**
-        * Protected constructor
-        *
-        * @return      void
-        */
-       protected function __construct () {
-               // Call parent constructor
-               parent::__construct(__CLASS__);
-       }
-
-       /**
-        * Creates an instance of this database wrapper by a provided user class
-        *
-        * @return      $wrapperInstance        An instance of the created wrapper class
-        */
-       public static final function createRegionMapDatabaseWrapper () {
-               // Get a new instance
-               $wrapperInstance = new RegionMapDatabaseWrapper();
-
-               // Set (primary!) table name
-               $wrapperInstance->setTableName(self::DB_TABLE_REGION_MAP);
-
-               // Return the instance
-               return $wrapperInstance;
-       }
-
-       /**
-        * Removes non-public data from given array.
-        *
-        * @param       $data   An array with possible non-public data that needs to be removed.
-        * @return      $data   A cleaned up array with only public data.
-        */
-       public function removeNonPublicDataFromArray(array $data) {
-               // Currently call only inner method
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('REGION-WRAPPER[' . __METHOD__ . ':' . __LINE__ . ']: Calling parent::removeNonPublicDataFromArray(data) ...');
-               $data = parent::removeNonPublicDataFromArray($data);
-
-               // Return cleaned data
-               return $data;
-       }
-
-       /**
-        * Creates a region by given name
-        *
-        * @return      void
-        */
-       public function createRegionByName () {
-               // Pre-check
-               die(__METHOD__ . ': Unfinshed!');
-               assert(!$this->ifRegionExists($regionName));
-
-               // Get user instance
-               $userInstance = GenericRegistry::getRegistry()->getInstance('user');
-
-               // Get a dataset instance
-               $dataSetInstance = ObjectFactory::createObjectByConfiguredName('dataset_criteria_class', array(self::DB_TABLE_REGION_MAP));
-
-               // Set the primary key
-               $dataSetInstance->setUniqueKey(self::DB_COLUMN_REGION_ID);
-
-               // Add region name and assign user id
-               $dataSetInstance->addCriteria(self::DB_COLUMN_REGION_ID     , ($this->countTotalRows() + 1));
-
-               // "Insert" this dataset instance completely into the database
-               $this->queryInsertDataSet($dataSetInstance);
-
-               // Post-check name
-               assert($this->ifRegionExists($regionName));
-       }
-}
diff --git a/application/city/classes/factories/.htaccess b/application/city/classes/factories/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/factories/city_daemon/.htaccess b/application/city/classes/factories/city_daemon/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/factories/manager/.htaccess b/application/city/classes/factories/manager/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/factories/states/.htaccess b/application/city/classes/factories/states/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/factories/states/city/.htaccess b/application/city/classes/factories/states/city/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/filter/.htaccess b/application/city/classes/filter/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/filter/bootstrap/.htaccess b/application/city/classes/filter/bootstrap/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/filter/bootstrap/city_daemon/.htaccess b/application/city/classes/filter/bootstrap/city_daemon/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/filter/bootstrap/init/.htaccess b/application/city/classes/filter/bootstrap/init/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/filter/city_daemon/.htaccess b/application/city/classes/filter/city_daemon/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
index 2c9948638e1c9993388f10f3754b55086f93eb90..9d35f48599ee90a2ca54558ac652b9db6f178a59 100644 (file)
@@ -41,7 +41,7 @@ abstract class BaseCityFilter extends BaseFilter {
         * @param       $className      Real name of class
         * @return      void
         */
-       protected function __construct ($className) {
+       protected function __construct (string $className) {
                // Call parent constructor
                parent::__construct($className);
        }
diff --git a/application/city/classes/filter/shutdown/.htaccess b/application/city/classes/filter/shutdown/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/filter/shutdown/city/.htaccess b/application/city/classes/filter/shutdown/city/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/filter/task/.htaccess b/application/city/classes/filter/task/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/filter/task/city_daemon/.htaccess b/application/city/classes/filter/task/city_daemon/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/filter/verifier/.htaccess b/application/city/classes/filter/verifier/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
index 6e0263b5d81a1aff51fa05b1cb14f2faf671a4e9..cb9e6ca9e27d0c861f1c21932a7d1224157568c4 100644 (file)
@@ -3,7 +3,7 @@
 namespace Org\Mxchange\City\Filter\Verifier;
 
 // Import application-specific stuff
-use Org\Mxchange\City\Database\Frontend\Information\CityInformationDatabaseWrapper;
+use Org\Mxchange\City\Database\Frontend\Information\CityInformationDatabaseFrontend;
 use Org\Mxchange\City\Factory\Manager\ManagerFactory;
 
 // Import framework stuff
@@ -71,7 +71,7 @@ class CityNameVerifierFilter extends BaseFilter implements Filterable {
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
                // Get city name from request
-               $cityName = $requestInstance->getRequestElement(CityInformationDatabaseWrapper::DB_COLUMN_CITY_NAME);
+               $cityName = $requestInstance->getRequestElement(CityInformationDatabaseFrontend::DB_COLUMN_CITY_NAME);
 
                // Is the city name set?
                if (is_null($cityName)) {
@@ -110,7 +110,7 @@ class CityNameVerifierFilter extends BaseFilter implements Filterable {
         * @param       $cityName               Cityname to check for existence
         * @return      $alreadyTaken   Whether the city name has been taken
         */
-       private function ifCityNameIsTaken ($cityName) {
+       private function ifCityNameIsTaken (string $cityName) {
                // Get a new instance
                $managerInstance = ManagerFactory::createManagerByType('city');
 
diff --git a/application/city/classes/login/.htaccess b/application/city/classes/login/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/login/helper/.htaccess b/application/city/classes/login/helper/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/manager/.htaccess b/application/city/classes/manager/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/manager/city/.htaccess b/application/city/classes/manager/city/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
index 6d7952818de5887b38fcad2dab8f948f74f52283..0a962d4658f5a0e9e43fa0c8eb6629195e27675f 100644 (file)
@@ -3,12 +3,12 @@
 namespace Org\Mxchange\City\Manager\City;
 
 // Import application-specific stuff
-use Org\Mxchange\City\Database\Frontend\Information\CityInformationDatabaseWrapper;
+use Org\Mxchange\City\Database\Frontend\Information\CityInformationDatabaseFrontend;
 use Org\Mxchange\City\Factory\Manager\ManagerFactory;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
-use Org\Mxchange\CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory;
+use Org\Mxchange\CoreFramework\Factory\Database\Frontend\DatabaseFrontendFactory;
 use Org\Mxchange\CoreFramework\Request\Requestable;
 use Org\Mxchange\CoreFramework\Response\Responseable;
 
@@ -54,11 +54,11 @@ class CityManager extends BaseManager implements ManageableCity {
                // Get new instance
                $managerInstance = new CityManager();
 
-               // Get database wrapper
-               $wrapperInstance = DatabaseWrapperFactory::createWrapperByConfiguredName('city_info_db_wrapper_class');
+               // Get database frontend
+               $frontendInstance = DatabaseFrontendFactory::createFrontendByConfiguredName('city_info_db_frontend_class');
 
                // And set it here
-               $managerInstance->setWrapperInstance($wrapperInstance);
+               $managerInstance->setFrontendInstance($frontendInstance);
 
                // Return the prepared instance
                return $managerInstance;
@@ -71,7 +71,7 @@ class CityManager extends BaseManager implements ManageableCity {
         */
        public function isCityAlreadyFounded () {
                // Check if the currently set user has already founded a city
-               $isFounded = $this->getWrapperInstance()->ifUserHasFoundedCity();
+               $isFounded = $this->getFrontendInstance()->ifUserHasFoundedCity();
 
                // Return result
                return $isFounded;
@@ -83,9 +83,9 @@ class CityManager extends BaseManager implements ManageableCity {
         * @para        $cityName       Name of city
         * @return      $isTaken        Whether the given city name is already taken
         */
-       public function ifCityNameExists ($cityName) {
+       public function ifCityNameExists (string $cityName) {
                // Check if the given city name is taken
-               $isTaken = $this->getWrapperInstance()->ifCityExists($cityName);
+               $isTaken = $this->getFrontendInstance()->ifCityExists($cityName);
 
                // Return result
                return $isTaken;
@@ -99,10 +99,10 @@ class CityManager extends BaseManager implements ManageableCity {
        public function foundFirstCity () {
                // Check on request instance and 'city_name' element
                assert(FrameworkBootstrap::getRequestInstance() instanceof Requestable);
-               assert(FrameworkBootstrap::getRequestInstance()->isRequestElementSet(CityInformationDatabaseWrapper::DB_COLUMN_CITY_NAME));
+               assert(FrameworkBootstrap::getRequestInstance()->isRequestElementSet(CityInformationDatabaseFrontend::DB_COLUMN_CITY_NAME));
 
                // Get city name
-               $cityName = FrameworkBootstrap::getRequestInstance()->getRequestElement(CityInformationDatabaseWrapper::DB_COLUMN_CITY_NAME);
+               $cityName = FrameworkBootstrap::getRequestInstance()->getRequestElement(CityInformationDatabaseFrontend::DB_COLUMN_CITY_NAME);
 
                // Some pre-checks
                assert(!$this->isCityAlreadyFounded());
@@ -122,10 +122,10 @@ class CityManager extends BaseManager implements ManageableCity {
                $regionData = $regionResultInstance->current();
 
                // Add region id from it
-               FrameworkBootstrap::getRequestInstance()->setRequestElement(CityInformationDatabaseWrapper::DB_COLUMN_CITY_REGION_ID, $regionData[RegionInformationDatabaseWrapper::DB_COLUMN_REGION_ID]);
+               FrameworkBootstrap::getRequestInstance()->setRequestElement(CityInformationDatabaseFrontend::DB_COLUMN_CITY_REGION_ID, $regionData[RegionInformationDatabaseFrontend::DB_COLUMN_REGION_ID]);
 
                // Then create the first city
-               $this->getWrapperInstance()->createCityByRequest(FrameworkBootstrap::getRequestInstance());
+               $this->getFrontendInstance()->createCityByRequest(FrameworkBootstrap::getRequestInstance());
        }
 
        /**
diff --git a/application/city/classes/manager/city_entities/.htaccess b/application/city/classes/manager/city_entities/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/manager/city_entities/districts/.htaccess b/application/city/classes/manager/city_entities/districts/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
index 038e22ec77c7e40d7763de9dc3e4a21adfd13ab8..b4b26fa878f43cb38b3b1202da9c7c79af9dd4bd 100644 (file)
@@ -2,9 +2,11 @@
 // Own namespace
 namespace Org\Mxchange\City\Manager\Entities\Districts;
 
+// Import application-specific stuff
+use Org\Mxchange\City\Manager\BaseManager;
+
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory;
-use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
+use Org\Mxchange\CoreFramework\Factory\Database\Frontend\DatabaseFrontendFactory;
 use Org\Mxchange\CoreFramework\Registry\Registerable;
 
 /**
@@ -29,7 +31,7 @@ use Org\Mxchange\CoreFramework\Registry\Registerable;
  * 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 CityDistrictsManager extends BaseFrameworkSystem implements ManageableCityDistricts, Registerable {
+class CityDistrictsManager extends BaseManager implements ManageableCityDistricts, Registerable {
        /**
         * Protected constructor
         *
@@ -49,11 +51,11 @@ class CityDistrictsManager extends BaseFrameworkSystem implements ManageableCity
                // Get new instance
                $managerInstance = new CityDistrictsManager();
 
-               // Get database wrapper
-               $wrapperInstance = DatabaseWrapperFactory::createWrapperByConfiguredName('city_districts_db_wrapper_class');
+               // Get database frontend
+               $frontendInstance = DatabaseFrontendFactory::createFrontendByConfiguredName('city_districts_db_frontend_class');
 
                // And set it here
-               $managerInstance->setWrapperInstance($wrapperInstance);
+               $managerInstance->setFrontendInstance($frontendInstance);
 
                // Return the prepared instance
                return $managerInstance;
diff --git a/application/city/classes/manager/city_entities/lots/.htaccess b/application/city/classes/manager/city_entities/lots/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
index 9a03e67919862262a5c4baf91d3e4443c5e07be9..8090ed0bf4b6c74d8e2cebd74b7fd049876c924f 100644 (file)
@@ -2,9 +2,11 @@
 // Own namespace
 namespace Org\Mxchange\City\Manager\Entities\Lots;
 
+// Import application-specific stuff
+use Org\Mxchange\City\Manager\BaseManager;
+
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory;
-use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
+use Org\Mxchange\CoreFramework\Factory\Database\Frontend\DatabaseFrontendFactory;
 use Org\Mxchange\CoreFramework\Registry\Registerable;
 
 /**
@@ -29,7 +31,7 @@ use Org\Mxchange\CoreFramework\Registry\Registerable;
  * 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 CityLotsManager extends BaseFrameworkSystem implements ManageableCityLots, Registerable {
+class CityLotsManager extends BaseManager implements ManageableCityLots, Registerable {
        /**
         * Protected constructor
         *
@@ -49,11 +51,11 @@ class CityLotsManager extends BaseFrameworkSystem implements ManageableCityLots,
                // Get new instance
                $managerInstance = new CityLotsManager();
 
-               // Get database wrapper
-               $wrapperInstance = DatabaseWrapperFactory::createWrapperByConfiguredName('city_lots_db_wrapper_class');
+               // Get database frontend
+               $frontendInstance = DatabaseFrontendFactory::createFrontendByConfiguredName('city_lots_db_frontend_class');
 
                // And set it here
-               $managerInstance->setWrapperInstance($wrapperInstance);
+               $managerInstance->setFrontendInstance($frontendInstance);
 
                // Return the prepared instance
                return $managerInstance;
diff --git a/application/city/classes/manager/city_entities/sections/.htaccess b/application/city/classes/manager/city_entities/sections/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
index 9f74e31cda83b1ce2463a9afdf437e91a0dc84db..d9144a81cfa61dbd848edd226c34fb43a7fec3c9 100644 (file)
@@ -2,9 +2,11 @@
 // Own namespace
 namespace Org\Mxchange\City\Manager\Entities\Sections;
 
+// Load application-specific stuff
+use Org\Mxchange\City\Manager\BaseManager;
+
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory;
-use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
+use Org\Mxchange\CoreFramework\Factory\Database\Frontend\DatabaseFrontendFactory;
 use Org\Mxchange\CoreFramework\Registry\Registerable;
 
 /**
@@ -29,7 +31,7 @@ use Org\Mxchange\CoreFramework\Registry\Registerable;
  * 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 CitySectionsManager extends BaseFrameworkSystem implements ManageableCitySections, Registerable {
+class CitySectionsManager extends BaseManager implements ManageableCitySections, Registerable {
        /**
         * Protected constructor
         *
@@ -49,11 +51,11 @@ class CitySectionsManager extends BaseFrameworkSystem implements ManageableCityS
                // Get new instance
                $managerInstance = new CitySectionsManager();
 
-               // Get database wrapper
-               $wrapperInstance = DatabaseWrapperFactory::createWrapperByConfiguredName('city_sections_db_wrapper_class');
+               // Get database frontend
+               $frontendInstance = DatabaseFrontendFactory::createFrontendByConfiguredName('city_sections_db_frontend_class');
 
                // And set it here
-               $managerInstance->setWrapperInstance($wrapperInstance);
+               $managerInstance->setFrontendInstance($frontendInstance);
 
                // Return the prepared instance
                return $managerInstance;
@@ -70,7 +72,7 @@ class CitySectionsManager extends BaseFrameworkSystem implements ManageableCityS
                $requireExpansion = FALSE;
 
                // First, a simple check if the sections table contains any entries at all
-               if ($this->getWrapperInstance()->countTotalRows() == 0) {
+               if ($this->getFrontendInstance()->countTotalRows() == 0) {
                        // This definedly requires expansion
                        $requireExpansion = TRUE;
                } // END - if
@@ -87,18 +89,18 @@ class CitySectionsManager extends BaseFrameworkSystem implements ManageableCityS
         * @todo z-coordinate not used
         */
        public function expandMaps () {
-               // Get a city info wrapper instance
-               $cityWrapperInstance = DatabaseWrapperFactory::createWrapperByConfiguredName('city_info_db_wrapper_class');
+               // Get a city info frontend instance
+               $cityFrontendInstance = DatabaseFrontendFactory::createFrontendByConfiguredName('city_info_db_frontend_class');
 
                // Get all city ids from it
-               $cityIds = $cityWrapperInstance->getAllCityIds();
+               $cityIds = $cityFrontendInstance->getAllCityIds();
 
                // Now check all ids
                foreach ($cityIds as $cityId) {
                        // Does this id have any sections
-                       if (!$this->getWrapperInstance()->ifCityHasSections($cityId)) {
+                       if (!$this->getFrontendInstance()->ifCityHasSections($cityId)) {
                                // Nothing found, so it is a brand-new city that needs first initialization
-                               $sections = $this->getWrapperInstance()->doInitialCityExpansion($cityId);
+                               $sections = $this->getFrontendInstance()->doInitialCityExpansion($cityId);
                        } else {
                                // @TODO Maybe some expansion is needed
                        }
index 4fc07fa87a2af53ed9de2349085077250c642fb2..251f2656c3910da5c2467fb6b3455f8b2c51563a 100644 (file)
@@ -7,6 +7,7 @@ use Org\Mxchange\City\Generic\BaseCitySystem;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Traits\Database\Frontend\DatabaseFrontendTrait;
 
 /**
  * A general Manager class
@@ -31,13 +32,16 @@ use Org\Mxchange\CoreFramework\Registry\Registerable;
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 abstract class BaseManager extends BaseCitySystem implements Manageable, Registerable {
+       // Load traits
+       use DatabaseFrontendTrait;
+
        /**
         * Protected constructor
         *
         * @param       $className      Name of the class
         * @return      void
         */
-       protected function __construct ($className) {
+       protected function __construct (string $className) {
                // Call parent constructor
                parent::__construct($className);
        }
diff --git a/application/city/classes/manager/game/.htaccess b/application/city/classes/manager/game/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
index 6eea04d78f29482e37fd7f06d1bb051bf7a4a9fc..aa2ae4c9c0a0e8ede1c1f17e984925d18cd4f37e 100644 (file)
@@ -3,7 +3,7 @@
 namespace Org\Mxchange\City\Manager\Region;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory;
+use Org\Mxchange\CoreFramework\Factory\Database\Frontend\DatabaseFrontendFactory;
 
 /**
  * A game manager
@@ -47,11 +47,11 @@ class GameOptionsManager extends BaseManager implements ManageableGame {
                // Get new instance
                $managerInstance = new GameOptionsManager();
 
-               // Get database wrapper
-               $wrapperInstance = DatabaseWrapperFactory::createWrapperByConfiguredName('game_options_db_wrapper_class');
+               // Get database frontend
+               $frontendInstance = DatabaseFrontendFactory::createFrontendByConfiguredName('game_options_db_frontend_class');
 
                // And set it here
-               $managerInstance->setWrapperInstance($wrapperInstance);
+               $managerInstance->setFrontendInstance($frontendInstance);
 
                // Return the prepared instance
                return $managerInstance;
diff --git a/application/city/classes/manager/region/.htaccess b/application/city/classes/manager/region/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
index 1872cf507202544f3cff58e03255ce27195a133e..b5cfaf143620155e47aa73d1ef5292942d0fd892 100644 (file)
@@ -3,7 +3,7 @@
 namespace Org\Mxchange\City\Manager\Region;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory;
+use Org\Mxchange\CoreFramework\Factory\Database\Frontend\DatabaseFrontendFactory;
 
 /**
  * A Region manager
@@ -47,11 +47,11 @@ class RegionManager extends BaseManager implements ManageableRegion {
                // Get new instance
                $managerInstance = new RegionManager();
 
-               // Get database wrapper
-               $wrapperInstance = DatabaseWrapperFactory::createWrapperByConfiguredName('region_info_db_wrapper_class');
+               // Get database frontend
+               $frontendInstance = DatabaseFrontendFactory::createFrontendByConfiguredName('region_info_db_frontend_class');
 
                // And set it here
-               $managerInstance->setWrapperInstance($wrapperInstance);
+               $managerInstance->setFrontendInstance($frontendInstance);
 
                // Return the prepared instance
                return $managerInstance;
@@ -64,7 +64,7 @@ class RegionManager extends BaseManager implements ManageableRegion {
         */
        public function ifUserHasCreatedRegion () {
                // Check if the currently set user has already founded a region
-               $isFounded = $this->getWrapperInstance()->ifUserHasCreatedRegion();
+               $isFounded = $this->getFrontendInstance()->ifUserHasCreatedRegion();
 
                // Return result
                return $isFounded;
@@ -78,7 +78,7 @@ class RegionManager extends BaseManager implements ManageableRegion {
         */
        public function ifRegionNameExists ($regionName) {
                // Check if the given region name is taken
-               $isTaken = $this->getWrapperInstance()->ifRegionExists($regionName);
+               $isTaken = $this->getFrontendInstance()->ifRegionExists($regionName);
 
                // Return result
                return $isTaken;
@@ -99,7 +99,7 @@ class RegionManager extends BaseManager implements ManageableRegion {
                assert(!$this->ifRegionNameExists($regionName));
 
                // First region can now be created
-               $this->getWrapperInstance()->createRegionByName($regionName);
+               $this->getFrontendInstance()->createRegionByName($regionName);
 
                // Then try to find it
                assert($this->ifRegionNameExists($regionName));
index 9b894cb66b8ffe9d50336f0528eb4940b5225159..1e3b774ef63c10bcc08eeb8a86bf0a0e4a07d1a7 100644 (file)
@@ -3,7 +3,7 @@
 namespace Org\Mxchange\City\Manager\RegionMap;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory;
+use Org\Mxchange\CoreFramework\Factory\Database\Frontend\DatabaseFrontendFactory;
 
 /**
  * A region map manager
@@ -47,11 +47,11 @@ class RegionMapManager extends BaseManager implements ManageableRegionMap {
                // Get new instance
                $managerInstance = new RegionMapManager();
 
-               // Get database wrapper
-               $wrapperInstance = DatabaseWrapperFactory::createWrapperByConfiguredName('region_map_db_wrapper_class');
+               // Get database frontend
+               $frontendInstance = DatabaseFrontendFactory::createFrontendByConfiguredName('region_map_db_frontend_class');
 
                // And set it here
-               $managerInstance->setWrapperInstance($wrapperInstance);
+               $managerInstance->setFrontendInstance($frontendInstance);
 
                // Return the prepared instance
                return $managerInstance;
diff --git a/application/city/classes/menu/.htaccess b/application/city/classes/menu/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/menu/government/.htaccess b/application/city/classes/menu/government/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/registration/.htaccess b/application/city/classes/registration/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
index 5c1e74ba417bc3b2ff737d28166393a1dcd2f062..5e2680d55b6dd2a25bcc268e7b9f5f27d5c6ce48 100644 (file)
@@ -5,8 +5,8 @@ namespace Org\Mxchange\City\Registration;
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\Criteria\Storing\StoreableCriteria;
-use Org\Mxchange\CoreFramework\Database\Frontend\User\UserDatabaseWrapper;
-use Org\Mxchange\CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory;
+use Org\Mxchange\CoreFramework\Database\Frontend\User\UserDatabaseFrontend;
+use Org\Mxchange\CoreFramework\Factory\Database\Frontend\DatabaseFrontendFactory;
 use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registration\BaseRegistration;
 use Org\Mxchange\CoreFramework\Registration\User\UserRegister;
@@ -132,11 +132,11 @@ class CityRegistration extends BaseRegistration implements UserRegister {
         * @todo        Maybe add more things to perform
         */
        public function registerNewUser () {
-               // Get a user database wrapper
-               $wrapperInstance = DatabaseWrapperFactory::createWrapperByConfiguredName('user_db_wrapper_class');
+               // Get a user database frontend
+               $frontendInstance = DatabaseFrontendFactory::createFrontendByConfiguredName('user_db_frontend_class');
 
                // Use this instance to insert the whole registration instance
-               $wrapperInstance->insertRegistrationObject($this);
+               $frontendInstance->insertRegistrationObject($this);
        }
 
        /**
@@ -207,10 +207,10 @@ class CityRegistration extends BaseRegistration implements UserRegister {
                } // END - foreach
 
                // Mark the username as unique key
-               $criteriaInstance->setUniqueKey(UserDatabaseWrapper::DB_COLUMN_USERNAME);
+               $criteriaInstance->setUniqueKey(UserDatabaseFrontend::DB_COLUMN_USERNAME);
 
                // Add account status as configured
-               $criteriaInstance->addConfiguredCriteria(UserDatabaseWrapper::DB_COLUMN_USER_STATUS, $configEntry);
+               $criteriaInstance->addConfiguredCriteria(UserDatabaseFrontend::DB_COLUMN_USER_STATUS, $configEntry);
 
                // Include registration timestamp
                $criteriaInstance->addCriteria('registered', date('Y-m-d H:i:s', time()));
diff --git a/application/city/classes/resolver/.htaccess b/application/city/classes/resolver/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/resolver/command/.htaccess b/application/city/classes/resolver/command/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/resolver/command/console/.htaccess b/application/city/classes/resolver/command/console/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/resolver/command/html/.htaccess b/application/city/classes/resolver/command/html/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/resolver/controller/.htaccess b/application/city/classes/resolver/controller/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/resolver/controller/console/.htaccess b/application/city/classes/resolver/controller/console/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/resolver/controller/html/.htaccess b/application/city/classes/resolver/controller/html/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/resolver/controller/image/.htaccess b/application/city/classes/resolver/controller/image/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/states/.htaccess b/application/city/classes/states/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/states/city/.htaccess b/application/city/classes/states/city/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/states/city/active/.htaccess b/application/city/classes/states/city/active/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
index 11e8dd6ae706ff75b3e0d76c8552631ede8cce0d..0394e005faa3a6fc1026bee27c5eebcf11de2cfd 100644 (file)
@@ -37,7 +37,7 @@ abstract class BaseCityState extends BaseState {
         * @param       $className      Name of the class
         * @return      void
         */
-       protected function __construct ($className) {
+       protected function __construct (string $className) {
                // Call parent constructor
                parent::__construct($className);
        }
diff --git a/application/city/classes/states/city/init/.htaccess b/application/city/classes/states/city/init/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/tasks/.htaccess b/application/city/classes/tasks/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
index a489bbd7399d1a9e3067a8d566991bc6ceae6e4b..55eb89ecf5f78b66b57caf70eed9e2ddbc647f43 100644 (file)
@@ -42,7 +42,7 @@ abstract class BaseCityTask extends BaseTask {
         * @param       $className      Name of the class
         * @return      void
         */
-       protected function __construct ($className) {
+       protected function __construct (string $className) {
                // Call parent constructor
                parent::__construct($className);
        }
diff --git a/application/city/classes/tasks/daemon/.htaccess b/application/city/classes/tasks/daemon/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/tasks/daemon/building/.htaccess b/application/city/classes/tasks/daemon/building/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/tasks/daemon/household/.htaccess b/application/city/classes/tasks/daemon/household/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/tasks/daemon/map_expander/.htaccess b/application/city/classes/tasks/daemon/map_expander/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/visitor/.htaccess b/application/city/classes/visitor/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/classes/visitor/tasks/.htaccess b/application/city/classes/visitor/tasks/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
index 6a602fd6fb708fcc5875bde8f3d2dadc36efa9ce..9aa93462c69efbd471264dd928ded4127b4bd858 100644 (file)
@@ -44,25 +44,25 @@ $cfg->setConfigEntry('news_process_filter_class', 'Org\Mxchange\CoreFramework\Fi
 $cfg->setConfigEntry('news_reader_class', 'Org\Mxchange\CoreFramework\Reader\News\Console\ConsoleNewsReader');
 
 // CFG: CITY-INFO-DB-WRAPPER-CLASS
-$cfg->setConfigEntry('city_info_db_wrapper_class', 'Org\Mxchange\City\Database\Frontend\Information\CityInformationDatabaseWrapper');
+$cfg->setConfigEntry('city_info_db_frontend_class', 'Org\Mxchange\City\Database\Frontend\Information\CityInformationDatabaseFrontend');
 
 // CFG: REGION-INFO-DB-WRAPPER-CLASS
-$cfg->setConfigEntry('region_info_db_wrapper_class', 'Org\Mxchange\City\Database\Frontend\RegionInformation\RegionInformationDatabaseWrapper');
+$cfg->setConfigEntry('region_info_db_frontend_class', 'Org\Mxchange\City\Database\Frontend\RegionInformation\RegionInformationDatabaseFrontend');
 
 // CFG: GAME-OPTIONS-DB-WRAPPER-CLASS
-$cfg->setConfigEntry('game_options_db_wrapper_class', 'Org\Mxchange\City\Database\Frontend\GameOptions\CityGameOptionsDatabaseWrapper');
+$cfg->setConfigEntry('game_options_db_frontend_class', 'Org\Mxchange\City\Database\Frontend\GameOptions\CityGameOptionsDatabaseFrontend');
 
 // CFG: REGION-MAP-DB-WRAPPER-CLASS
-$cfg->setConfigEntry('region_map_db_wrapper_class', 'Org\Mxchange\City\Database\Frontend\Region\RegionMapDatabaseWrapper');
+$cfg->setConfigEntry('region_map_db_frontend_class', 'Org\Mxchange\City\Database\Frontend\Region\RegionMapDatabaseFrontend');
 
 // CFG: CITY-SECTIONS-DB-WRAPPER-CLASS
-$cfg->setConfigEntry('city_sections_db_wrapper_class', 'Org\Mxchange\City\Database\Frontend\Sections\CitySectionsDatabaseWrapper');
+$cfg->setConfigEntry('city_sections_db_frontend_class', 'Org\Mxchange\City\Database\Frontend\Sections\CitySectionsDatabaseFrontend');
 
 // CFG: CITY-LOTS-DB-WRAPPER-CLASS
-$cfg->setConfigEntry('city_lots_db_wrapper_class', 'Org\Mxchange\City\Database\Frontend\Lots\CityLotsDatabaseWrapper');
+$cfg->setConfigEntry('city_lots_db_frontend_class', 'Org\Mxchange\City\Database\Frontend\Lots\CityLotsDatabaseFrontend');
 
 // CFG: CITY-DISTRICTS-DB-WRAPPER-CLASS
-$cfg->setConfigEntry('city_districts_db_wrapper_class', 'Org\Mxchange\City\Database\Frontend\Districts\CityDistrictsDatabaseWrapper');
+$cfg->setConfigEntry('city_districts_db_frontend_class', 'Org\Mxchange\City\Database\Frontend\Districts\CityDistrictsDatabaseFrontend');
 
 // CFG: CITY-INIT-STATE-CLASS
 $cfg->setConfigEntry('city_init_state_class', 'Org\Mxchange\City\State\Init\CityInitState');
@@ -468,13 +468,13 @@ $cfg->setConfigEntry('government_class', 'SimplifiedGovernment');
 $cfg->setConfigEntry('bank_class', 'MoneyBank');
 
 // CFG: USER-POINTS-DB-WRAPPER-CLASS
-$cfg->setConfigEntry('user_points_db_wrapper_class', 'Org\Mxchange\CoreFramework\Database\Frontend\Points\UserPointsDatabaseWrapper');
+$cfg->setConfigEntry('user_points_db_frontend_class', 'Org\Mxchange\CoreFramework\Database\Frontend\Points\UserPointsDatabaseFrontend');
 
 // CFG: USER-GOVERNMENT-WRAPPER-CLASS
-$cfg->setConfigEntry('user_government_wrapper_class', 'UserGovernmentDatabaseWrapper');
+$cfg->setConfigEntry('user_government_frontend_class', 'UserGovernmentDatabaseFrontend');
 
 // CFG: PAYMENT-DB-WRAPPER-CLASS
-$cfg->setConfigEntry('payment_db_wrapper_class', 'Org\Mxchange\CoreFramework\Database\Frontend\PaymentsDatabaseWrapper');
+$cfg->setConfigEntry('payment_db_frontend_class', 'Org\Mxchange\CoreFramework\Database\Frontend\PaymentsDatabaseFrontend');
 
 // CFG: LOGIN-ENABLED
 $cfg->setConfigEntry('login_enabled', 'Y');
diff --git a/application/city/exceptions/.htaccess b/application/city/exceptions/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/interfaces/.htaccess b/application/city/interfaces/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/interfaces/database/.htaccess b/application/city/interfaces/database/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/interfaces/database/frontend/.htaccess b/application/city/interfaces/database/frontend/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/interfaces/database/frontend/city/.htaccess b/application/city/interfaces/database/frontend/city/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/interfaces/database/frontend/city/class_CityInformationFrontend.php b/application/city/interfaces/database/frontend/city/class_CityInformationFrontend.php
new file mode 100644 (file)
index 0000000..153245e
--- /dev/null
@@ -0,0 +1,91 @@
+<?php
+// Own namespace
+namespace Org\Mxchange\City\Database\Frontend\Information;
+
+// Import application-specific stuff
+use Org\Mxchange\City\Daemon\BaseCityDaemon;
+use Org\Mxchange\City\Helper\CityHelper;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Database\Frontend\DatabaseFrontend;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+
+/**
+ * An interface for city-information (database) frontend
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.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.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/>.
+ */
+interface CityInformationFrontend extends DatabaseFrontend {
+       /**
+        * 'Registers' a new city id along with data provided in the city instance.
+        * This may sound confusing but avoids double code very nicely...
+        *
+        * @param       $cityInstance           A city instance
+        * @param       $requestInstance        An instance of a Requestable class
+        * @return      void
+        */
+       function registerCityId (BaseCityDaemon $cityInstance, Requestable $requestInstance);
+
+       /**
+        * Checks whether there is an entry for given city instance
+        *
+        * @param       $cityInstance   An instance of a CityHelper class
+        * @return      $isFound                Whether a city id has been found for this city
+        */
+       function ifCityDataIsFound (CityHelper $cityInstance);
+
+       /**
+        * Removes non-data from given array.
+        *
+        * @param       $data   An array with possible non-data that needs to be removed.
+        * @return      $data   A cleaned up array with only data.
+        */
+       function removeNonPublicDataFromArray(array $data);
+
+       /**
+        * Checks whether the user has already founded a city
+        *
+        * @return      $hasFounded             Whether the user has already founded a city
+        */
+       function ifUserHasFoundedCity ();
+
+       /**
+        * Checks whether the given city name is taken
+        *
+        * @para        $cityName       Name of city
+        * @return      $isTaken        Whether the given city name is taken
+        */
+       function ifCityExists (string $cityName);
+
+       /**
+        * Creates a city from given request
+        *
+        * @para        $requestInstance        An instance of a Requestable class
+        * @return      void
+        */
+       function createCityByRequest (Requestable $requestInstance);
+
+       /**
+        * Getter for all city ids as an array
+        *
+        * @return      $cityIds        All city ids as an array
+        */
+       function getAllCityIds ();
+}
diff --git a/application/city/interfaces/database/frontend/city/class_CityInformationWrapper.php b/application/city/interfaces/database/frontend/city/class_CityInformationWrapper.php
deleted file mode 100644 (file)
index 2de42b2..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-<?php
-// Own namespace
-namespace Org\Mxchange\City\Database\Frontend\Information;
-
-// Import application-specific stuff
-use Org\Mxchange\City\Daemon\BaseCityDaemon;
-use Org\Mxchange\City\Helper\CityHelper;
-
-// Import framework stuff
-use Org\Mxchange\CoreFramework\Database\Frontend\DatabaseWrapper;
-use Org\Mxchange\CoreFramework\Request\Requestable;
-
-/**
- * An interface for city-information (database) wrapper
- *
- * @author             Roland Haeder <webmaster@shipsimu.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.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/>.
- */
-interface CityInformationWrapper extends DatabaseWrapper {
-       /**
-        * 'Registers' a new city id along with data provided in the city instance.
-        * This may sound confusing but avoids double code very nicely...
-        *
-        * @param       $cityInstance           A city instance
-        * @param       $requestInstance        An instance of a Requestable class
-        * @return      void
-        */
-       function registerCityId (BaseCityDaemon $cityInstance, Requestable $requestInstance);
-
-       /**
-        * Checks whether there is an entry for given city instance
-        *
-        * @param       $cityInstance   An instance of a CityHelper class
-        * @return      $isFound                Whether a city id has been found for this city
-        */
-       function ifCityDataIsFound (CityHelper $cityInstance);
-
-       /**
-        * Removes non-data from given array.
-        *
-        * @param       $data   An array with possible non-data that needs to be removed.
-        * @return      $data   A cleaned up array with only data.
-        */
-       function removeNonPublicDataFromArray(array $data);
-
-       /**
-        * Checks whether the user has already founded a city
-        *
-        * @return      $hasFounded             Whether the user has already founded a city
-        */
-       function ifUserHasFoundedCity ();
-
-       /**
-        * Checks whether the given city name is taken
-        *
-        * @para        $cityName       Name of city
-        * @return      $isTaken        Whether the given city name is taken
-        */
-       function ifCityExists ($cityName);
-
-       /**
-        * Creates a city from given request
-        *
-        * @para        $requestInstance        An instance of a Requestable class
-        * @return      void
-        */
-       function createCityByRequest (Requestable $requestInstance);
-
-       /**
-        * Getter for all city ids as an array
-        *
-        * @return      $cityIds        All city ids as an array
-        */
-       function getAllCityIds ();
-}
diff --git a/application/city/interfaces/database/frontend/city_entities/.htaccess b/application/city/interfaces/database/frontend/city_entities/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/interfaces/database/frontend/city_entities/districts/.htaccess b/application/city/interfaces/database/frontend/city_entities/districts/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/interfaces/database/frontend/city_entities/districts/class_CityDistrictsFrontend.php b/application/city/interfaces/database/frontend/city_entities/districts/class_CityDistrictsFrontend.php
new file mode 100644 (file)
index 0000000..383e138
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+// Own namespace
+namespace Org\Mxchange\City\Database\Frontend\Districts;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Database\Frontend\DatabaseFrontend;
+
+/**
+ * An interface for city districts (database) frontend
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.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.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/>.
+ */
+interface CityDistrictsFrontend extends DatabaseFrontend {
+       /**
+        * Checks if the given city id is found in districts table
+        *
+        * @param       $cityId         City id to check
+        * @return      $isFound        Whether the city id is found
+        */
+       function ifCityHasDistricts (int $cityId);
+}
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
deleted file mode 100644 (file)
index 510bab2..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-// Own namespace
-namespace Org\Mxchange\City\Database\Frontend\Districts;
-
-// Import framework stuff
-use Org\Mxchange\CoreFramework\Database\Frontend\DatabaseWrapper;
-
-/**
- * An interface for city districts (database) wrapper
- *
- * @author             Roland Haeder <webmaster@shipsimu.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.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/>.
- */
-interface CityDistrictsWrapper extends DatabaseWrapper {
-       /**
-        * Checks if the given city id is found in districts table
-        *
-        * @param       $cityId         City id to check
-        * @return      $isFound        Whether the city id is found
-        */
-       function ifCityHasDistricts ($cityId);
-}
diff --git a/application/city/interfaces/database/frontend/city_entities/lots/.htaccess b/application/city/interfaces/database/frontend/city_entities/lots/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/interfaces/database/frontend/city_entities/lots/class_CityLotsFrontend.php b/application/city/interfaces/database/frontend/city_entities/lots/class_CityLotsFrontend.php
new file mode 100644 (file)
index 0000000..41e2d28
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+// Own namespace
+namespace Org\Mxchange\City\Database\Frontend\Lots;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Database\Frontend\DatabaseFrontend;
+
+/**
+ * An interface for city lots (database) frontend
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.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.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/>.
+ */
+interface CityLotsFrontend extends DatabaseFrontend {
+       /**
+        * Checks if the given city id is found in lots table
+        *
+        * @param       $cityId         City id to check
+        * @return      $isFound        Whether the city id is found
+        */
+       function ifCityHasLots (int $cityId);
+}
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
deleted file mode 100644 (file)
index 93760a6..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-// Own namespace
-namespace Org\Mxchange\City\Database\Frontend\Lots;
-
-// Import framework stuff
-use Org\Mxchange\CoreFramework\Database\Frontend\DatabaseWrapper;
-
-/**
- * An interface for city lots (database) wrapper
- *
- * @author             Roland Haeder <webmaster@shipsimu.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.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/>.
- */
-interface CityLotsWrapper extends DatabaseWrapper {
-       /**
-        * Checks if the given city id is found in lots table
-        *
-        * @param       $cityId         City id to check
-        * @return      $isFound        Whether the city id is found
-        */
-       function ifCityHasLots ($cityId);
-}
diff --git a/application/city/interfaces/database/frontend/city_entities/sections/.htaccess b/application/city/interfaces/database/frontend/city_entities/sections/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/interfaces/database/frontend/city_entities/sections/class_CitySectionsFrontend.php b/application/city/interfaces/database/frontend/city_entities/sections/class_CitySectionsFrontend.php
new file mode 100644 (file)
index 0000000..f1bfd37
--- /dev/null
@@ -0,0 +1,47 @@
+<?php
+// Own namespace
+namespace Org\Mxchange\City\Database\Frontend\Sections;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Database\Frontend\DatabaseFrontend;
+
+/**
+ * An interface for city sections (database) frontend
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.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.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/>.
+ */
+interface CitySectionsFrontend extends DatabaseFrontend {
+       /**
+        * Checks if the given city id is found in sections table
+        *
+        * @param       $cityId         City id to check
+        * @return      $isFound        Whether the city id is found
+        */
+       function ifCityHasSections (int $cityId);
+
+       /**
+        * Expands the sections table with initial data for given city id
+        *
+        * @param       $cityId         City id to check
+        * @return      $ids            Sections ids from initial expansion
+        * @todo z-coordinate not used
+        */
+       function doInitialCityExpansion (int $cityId);
+}
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
deleted file mode 100644 (file)
index 3d2c24d..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-// Own namespace
-namespace Org\Mxchange\City\Database\Frontend\Sections;
-
-// Import framework stuff
-use Org\Mxchange\CoreFramework\Database\Frontend\DatabaseWrapper;
-
-/**
- * An interface for city sections (database) wrapper
- *
- * @author             Roland Haeder <webmaster@shipsimu.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.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/>.
- */
-interface CitySectionsWrapper extends DatabaseWrapper {
-       /**
-        * Checks if the given city id is found in sections table
-        *
-        * @param       $cityId         City id to check
-        * @return      $isFound        Whether the city id is found
-        */
-       function ifCityHasSections ($cityId);
-
-       /**
-        * Expands the sections table with initial data for given city id
-        *
-        * @param       $cityId         City id to check
-        * @return      $ids            Sections ids from initial expansion
-        * @todo z-coordinate not used
-        */
-       function doInitialCityExpansion ($cityId);
-}
diff --git a/application/city/interfaces/database/frontend/game_options/.htaccess b/application/city/interfaces/database/frontend/game_options/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/interfaces/database/frontend/game_options/class_CityGameOptionsFrontend.php b/application/city/interfaces/database/frontend/game_options/class_CityGameOptionsFrontend.php
new file mode 100644 (file)
index 0000000..8882a07
--- /dev/null
@@ -0,0 +1,31 @@
+<?php
+// Own namespace
+namespace Org\Mxchange\City\Database\Frontend\GameOptions;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Database\Frontend\DatabaseFrontend;
+
+/**
+ * An interface for game options (database) frontend
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.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.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/>.
+ */
+interface CityGameOptionsFrontend extends DatabaseFrontend {
+}
diff --git a/application/city/interfaces/database/frontend/game_options/class_CityGameOptionsWrapper.php b/application/city/interfaces/database/frontend/game_options/class_CityGameOptionsWrapper.php
deleted file mode 100644 (file)
index 8734fac..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php
-// Own namespace
-namespace Org\Mxchange\City\Database\Frontend\GameOptions;
-
-// Import framework stuff
-use Org\Mxchange\CoreFramework\Database\Frontend\DatabaseWrapper;
-
-/**
- * An interface for game options (database) wrapper
- *
- * @author             Roland Haeder <webmaster@shipsimu.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.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/>.
- */
-interface CityGameOptionsWrapper extends DatabaseWrapper {
-}
diff --git a/application/city/interfaces/database/frontend/region/.htaccess b/application/city/interfaces/database/frontend/region/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/interfaces/database/frontend/region/class_RegionInformationFrontend.php b/application/city/interfaces/database/frontend/region/class_RegionInformationFrontend.php
new file mode 100644 (file)
index 0000000..7a9d9ba
--- /dev/null
@@ -0,0 +1,61 @@
+<?php
+// Own namespace
+namespace Org\Mxchange\City\Database\Frontend\Information\Region;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Database\Frontend\DatabaseFrontend;
+
+/**
+ * An interface for region-information (database) frontend
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.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.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/>.
+ */
+interface RegionInformationFrontend extends DatabaseFrontend {
+       /**
+        * Removes non-data from given array.
+        *
+        * @param       $data   An array with possible non-data that needs to be removed.
+        * @return      $data   A cleaned up array with only data.
+        */
+       function removeNonPublicDataFromArray(array $data);
+
+       /**
+        * Checks whether the user has already founded a region
+        *
+        * @return      $hasFounded             Whether the user has already founded a region
+        */
+       function ifUserHasCreatedRegion ();
+
+       /**
+        * Checks whether the given region name is taken
+        *
+        * @param       $regionName             Name of region
+        * @return      $isTaken                Whether the given region name is taken
+        */
+       function ifRegionExists ($regionName);
+
+       /**
+        * Creates a region by given name
+        *
+        * @param       $regionName             Name of region
+        * @return      void
+        */
+       function createRegionByName ($regionName);
+}
diff --git a/application/city/interfaces/database/frontend/region/class_RegionInformationWrapper.php b/application/city/interfaces/database/frontend/region/class_RegionInformationWrapper.php
deleted file mode 100644 (file)
index 5ee8646..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-<?php
-// Own namespace
-namespace Org\Mxchange\City\Database\Frontend\Information\Region;
-
-// Import framework stuff
-use Org\Mxchange\CoreFramework\Database\Frontend\DatabaseWrapper;
-
-/**
- * An interface for region-information (database) wrapper
- *
- * @author             Roland Haeder <webmaster@shipsimu.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.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/>.
- */
-interface RegionInformationWrapper extends DatabaseWrapper {
-       /**
-        * Removes non-data from given array.
-        *
-        * @param       $data   An array with possible non-data that needs to be removed.
-        * @return      $data   A cleaned up array with only data.
-        */
-       function removeNonPublicDataFromArray(array $data);
-
-       /**
-        * Checks whether the user has already founded a region
-        *
-        * @return      $hasFounded             Whether the user has already founded a region
-        */
-       function ifUserHasCreatedRegion ();
-
-       /**
-        * Checks whether the given region name is taken
-        *
-        * @param       $regionName             Name of region
-        * @return      $isTaken                Whether the given region name is taken
-        */
-       function ifRegionExists ($regionName);
-
-       /**
-        * Creates a region by given name
-        *
-        * @param       $regionName             Name of region
-        * @return      void
-        */
-       function createRegionByName ($regionName);
-}
diff --git a/application/city/interfaces/database/frontend/region/class_RegionMapFrontend.php b/application/city/interfaces/database/frontend/region/class_RegionMapFrontend.php
new file mode 100644 (file)
index 0000000..7624732
--- /dev/null
@@ -0,0 +1,31 @@
+<?php
+// Own namespace
+namespace Org\Mxchange\City\Database\Frontend\RegionMap;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Database\Frontend\DatabaseFrontend;
+
+/**
+ * An interface for region-map (database) frontend
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.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.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/>.
+ */
+interface RegionMapFrontend extends DatabaseFrontend {
+}
diff --git a/application/city/interfaces/database/frontend/region/class_RegionMapWrapper.php b/application/city/interfaces/database/frontend/region/class_RegionMapWrapper.php
deleted file mode 100644 (file)
index dafacba..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php
-// Own namespace
-namespace Org\Mxchange\City\Database\Frontend\RegionMap;
-
-// Import framework stuff
-use Org\Mxchange\CoreFramework\Database\Frontend\DatabaseWrapper;
-
-/**
- * An interface for region-map (database) wrapper
- *
- * @author             Roland Haeder <webmaster@shipsimu.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.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/>.
- */
-interface RegionMapWrapper extends DatabaseWrapper {
-}
diff --git a/application/city/interfaces/helper/.htaccess b/application/city/interfaces/helper/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/interfaces/helper/city/.htaccess b/application/city/interfaces/helper/city/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/interfaces/manager/.htaccess b/application/city/interfaces/manager/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/interfaces/manager/city/.htaccess b/application/city/interfaces/manager/city/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
index dd17ca3bcf4027ff21ca354a9c5e49d1be5b1975..6fe4dfc9b32608d9382756ca002fb56abaa659d8 100644 (file)
@@ -42,7 +42,7 @@ interface ManageableCity extends Manageable {
         * @para        $cityName       Name of city
         * @return      $isTaken        Whether the given city name is already taken
         */
-       function ifCityNameExists ($cityName);
+       function ifCityNameExists (string $cityName);
 
        /**
         * Founds the first city. A dummy region will also be created
diff --git a/application/city/interfaces/manager/city_entities/.htaccess b/application/city/interfaces/manager/city_entities/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/interfaces/manager/city_entities/districts/.htaccess b/application/city/interfaces/manager/city_entities/districts/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/interfaces/manager/city_entities/lots/.htaccess b/application/city/interfaces/manager/city_entities/lots/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/interfaces/manager/city_entities/sections/.htaccess b/application/city/interfaces/manager/city_entities/sections/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/interfaces/manager/region/.htaccess b/application/city/interfaces/manager/region/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/language/.htaccess b/application/city/language/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/templates/.htaccess b/application/city/templates/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/templates/code/.htaccess b/application/city/templates/code/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/templates/emails/.htaccess b/application/city/templates/emails/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/templates/html/.htaccess b/application/city/templates/html/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/templates/image/.htaccess b/application/city/templates/image/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/city/templates/menu/.htaccess b/application/city/templates/menu/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/core b/core
index 28ff0710d8eb3a2d0c1547d6ebeaae05eb50c7f6..303d853c3d98734f9d7a1a0445c98b6d6c444945 160000 (submodule)
--- a/core
+++ b/core
@@ -1 +1 @@
-Subproject commit 28ff0710d8eb3a2d0c1547d6ebeaae05eb50c7f6
+Subproject commit 303d853c3d98734f9d7a1a0445c98b6d6c444945