// Import framework stuff
use Org\Mxchange\CoreFramework\Controller\Controller;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
* 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 BaseCityAction extends BaseAction {
+abstract class BaseCityAction extends BaseAction {
/**
* Protected constructor
*
// Import framework stuff
use Org\Mxchange\CoreFramework\Controller\Controller;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
// Import framework stuff
use Org\Mxchange\CoreFramework\Controller\Controller;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
// Import framework stuff
use Org\Mxchange\CoreFramework\Controller\Controller;
use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
// Import framework stuff
use Org\Mxchange\CoreFramework\Controller\Controller;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
// Import framework stuff
use Org\Mxchange\CoreFramework\Controller\Controller;
use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
// Import framework stuff
use Org\Mxchange\CoreFramework\Controller\Controller;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
// Own namespace
namespace Org\Mxchange\City\Daemon\Simulation;
-// Import own stuff
+// Import application-specific stuff
use Org\Mxchange\City\Helper\CityHelper;
// Import framework stuff
use Org\Mxchange\CoreFramework\Handler\Task\HandleableTask;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
use Org\Mxchange\CoreFramework\Request\Requestable;
/**
// Own namespace
namespace Org\Mxchange\City\Daemon;
-// Import own stuff
+// Import application-specific stuff
+use Org\Mxchange\City\Factory\State\CityStateFactory;
use Org\Mxchange\City\Generic\BaseCitySystem;
+use Org\Mxchange\City\Database\Frontend\Information\CityInformationDatabaseWrapper;
// 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\Updateable;
+use Org\Mxchange\CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory;
use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
use Org\Mxchange\CoreFramework\Registry\Registry;
use Org\Mxchange\CoreFramework\Request\Requestable;
* 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 BaseCityDaemon extends BaseCitySystem implements Updateable, AddableCriteria {
+abstract class BaseCityDaemon extends BaseCitySystem implements Updateable, AddableCriteria {
/**
* City types
*/
// Output all lines
self::createDebugInstance(__CLASS__)->debugOutput(' ');
- self::createDebugInstance(__CLASS__)->debugOutput($app->getAppName() . ' v' . $app->getAppVersion() . ' - ' . $this->getRequestInstance()->getRequestElement('mode') . ' daemon starting');
+ self::createDebugInstance(__CLASS__)->debugOutput($app->getAppName() . ' v' . $app->getAppVersion() . ' - ' . FrameworkBootstrap::getRequestInstance()->getRequestElement('mode') . ' daemon starting');
self::createDebugInstance(__CLASS__)->debugOutput('Copyright (c) 2015, 2016 City Developer Team');
self::createDebugInstance(__CLASS__)->debugOutput(' ');
self::createDebugInstance(__CLASS__)->debugOutput('This program comes with ABSOLUTELY NO WARRANTY; for details see docs/COPYING.');
// Own namespace
namespace Org\Mxchange\City\Daemon\Simulation;
-// Import own stuff
+// Import application-specific stuff
use Org\Mxchange\City\Daemon\BaseCityDaemon;
use Org\Mxchange\City\Helper\CityHelper;
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
use Org\Mxchange\CoreFramework\Handler\Task\HandleableTask;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
use Org\Mxchange\CoreFramework\Registry\Registry;
use Org\Mxchange\CoreFramework\Request\Requestable;
// Own namespace
namespace Org\Mxchange\City\;
-// Import own stuff
+// Import application-specific stuff
use Org\Mxchange\City\Generic\BaseCitySystem;
/**
// Own namespace
namespace Org\Mxchange\City\;
-// Import own stuff
+// Import application-specific stuff
use Org\Mxchange\City\Generic\BaseCitySystem;
/**
* 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 Base??? extends BaseCitySystem {
+abstract class Base??? extends BaseCitySystem {
/**
* Protected constructor
*
// Own namespace
namespace Org\Mxchange\City\Generic;
-// Import own stuff
+// Import application-specific stuff
use Org\Mxchange\City\Helper\CityHelper;
// Import framework stuff
* 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 BaseCitySystem extends BaseFrameworkSystem {
+abstract class BaseCitySystem extends BaseFrameworkSystem {
// Exception codes
const EXCEPTION_UNSUPPORTED_ERROR_HANDLER = 0x900;
const EXCEPTION_BASE64_ENCODING_NOT_MODULO_4 = 0x901;
// Own namespace
namespace Org\Mxchange\City\Command;
-// Import own stuff
+// Import application-specific stuff
use Org\Mxchange\City\Daemon\Factory\CityDaemonFactory;
// Import framework stuff
use Org\Mxchange\CoreFramework\Command\BaseCommand;
use Org\Mxchange\CoreFramework\Command\Commandable;
use Org\Mxchange\CoreFramework\Controller\Controller;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
use Org\Mxchange\CoreFramework\Response\Responseable;
// Own namespace
namespace Org\Mxchange\City\Database\Frontend\Information;
-// Import own stuff
+// 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\BaseDatabaseWrapper;
use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
use Org\Mxchange\CoreFramework\Registry\Registry;
use Org\Mxchange\CoreFramework\Request\Requestable;
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
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
namespace Org\Mxchange\City\Database\Frontend\Sections;
// 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 sections. Sections are the smalles entity of a
<?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
*
namespace Org\Mxchange\City\Database\Frontend\RegionInformation;
// Import framework stuff
+use Org\Mxchange\CoreFramework\Database\Frontend\BaseDatabaseWrapper;
use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
use Org\Mxchange\CoreFramework\Registry\Registry;
/**
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\Registerable;
use Org\Mxchange\CoreFramework\Registry\Registry;
/**
// Own namespace
namespace Org\Mxchange\City\Factory\State;
-// Import own stuff
+// Import application-specific stuff
use Org\Mxchange\City\Daemon\Factory\CityDaemonFactory;
// Import framework stuff
// Own namespace
namespace Org\Mxchange\City\Daemon\Filter\Bootstrap;
-// Import own stuff
+// Import application-specific stuff
use Org\Mxchange\City\Daemon\Factory\CityDaemonFactory;
use Org\Mxchange\City\Filter\BaseCityFilter;
// Own namespace
namespace Org\Mxchange\City\Daemon\Filter\Bootstrap;
-// Import own stuff
+// Import application-specific stuff
use Org\Mxchange\City\Daemon\Factory\CityDaemonFactory;
use Org\Mxchange\City\Filter\BaseCityFilter;
// Own namespace
namespace Org\Mxchange\City\Daemon\Filter\Bootstrap;
-// Import own stuff
+// Import application-specific stuff
use Org\Mxchange\City\Filter\BaseCityFilter;
// Import framework stuff
// Own namespace
namespace Org\Mxchange\City\Daemon\Filter\Bootstrap;
-// Import own stuff
+// Import application-specific stuff
use Org\Mxchange\City\Daemon\Factory\CityDaemonFactory;
use Org\Mxchange\City\Filter\BaseCityFilter;
// Own namespace
namespace Org\Mxchange\City\Daemon\Filter;
-// Import own stuff
+// Import application-specific stuff
use Org\Mxchange\City\Filter\BaseCityFilter;
// Import framework stuff
// Own namespace
namespace Org\Mxchange\City\Daemon\Filter\Initialization;
-// Import own stuff
+// Import application-specific stuff
use Org\Mxchange\City\Daemon\Factory\CityDaemonFactory;
use Org\Mxchange\City\Filter\BaseCityFilter;
// Own namespace
namespace Org\Mxchange\City\Daemon\Filter;
-// Import own stuff
+// Import application-specific stuff
use Org\Mxchange\City\Filter\BaseCityFilter;
// Import framework stuff
// Own namespace
namespace Org\Mxchange\City\Daemon\Filter;
-// Import own stuff
+// Import application-specific stuff
use Org\Mxchange\City\Daemon\Factory\CityDaemonFactory;
use Org\Mxchange\City\Filter\BaseCityFilter;
// Own namespace
namespace Org\Mxchange\City\!!!\Filter;
-// Import own stuff
+// Import application-specific stuff
use Org\Mxchange\City\Filter\BaseCityFilter;
// Import framework stuff
* 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 BaseCityFilter extends BaseFilter {
+abstract class BaseCityFilter extends BaseFilter {
/**
* Array with all data XML nodes (which hold the actual data) and their values
*/
// Own namespace
namespace Org\Mxchange\City\Daemon\Filter\Shutdown;
-// Import own stuff
+// Import application-specific stuff
use Org\Mxchange\City\Filter\BaseCityFilter;
// Import framework stuff
// Own namespace
namespace Org\Mxchange\City\Daemon\Filter\Shutdown;
-// Import own stuff
+// Import application-specific stuff
use Org\Mxchange\City\Daemon\Factory\CityDaemonFactory;
use Org\Mxchange\City\Filter\BaseCityFilter;
// Own namespace
namespace Org\Mxchange\City\Daemon\Filter\Shutdown;
-// Import own stuff
+// Import application-specific stuff
use Org\Mxchange\City\Filter\BaseCityFilter;
// Import framework stuff
// Own namespace
namespace Org\Mxchange\City\Daemon\Filter\Initialization\Tasks;
-// Import own stuff
+// Import application-specific stuff
use Org\Mxchange\City\Daemon\Factory\CityDaemonFactory;
use Org\Mxchange\City\Filter\BaseCityFilter;
// Own namespace
namespace Org\Mxchange\City\Filter\Verifier;
+// Import application-specific stuff
+use Org\Mxchange\City\Database\Frontend\Information\CityInformationDatabaseWrapper;
+
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\BaseFilter;
use Org\Mxchange\CoreFramework\Filter\Filterable;
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Registry\Registry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
public function encryptPassword ($requestKey) {
// Check if password is found in request
- if ($this->getRequestInstance()->isRequestElementSet($requestKey)) {
+ if (FrameworkBootstrap::getRequestInstance()->isRequestElementSet($requestKey)) {
// So encrypt the password and store it for later usage in
// the request:
// Get the plain password
- $plainPassword = $this->getRequestInstance()->getRequestElement($requestKey);
+ $plainPassword = FrameworkBootstrap::getRequestInstance()->getRequestElement($requestKey);
// Get user instance
$userInstance = Registry::getRegistry()->getInstance('user');
$this->hashedPassword = ObjectFactory::createObjectByConfiguredName('crypto_class')->hashString($plainPassword, $userInstance->getPasswordHash());
// Store the hash back in request
- $this->getRequestInstance()->setRequestElement('pass_hash', $this->hashedPassword);
+ FrameworkBootstrap::getRequestInstance()->setRequestElement('pass_hash', $this->hashedPassword);
} // END - if
}
}
namespace Org\Mxchange\City\Login\User;
// Import framework stuff
+use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
use Org\Mxchange\CoreFramework\Registry\Registry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
public function encryptPassword ($requestKey) {
// Check if password is found in request
- if ($this->getRequestInstance()->isRequestElementSet($requestKey)) {
+ if (FrameworkBootstrap::getRequestInstance()->isRequestElementSet($requestKey)) {
// So encrypt the password and store it for later usage in
// the request:
// Get the plain password
- $plainPassword = $this->getRequestInstance()->getRequestElement($requestKey);
+ $plainPassword = FrameworkBootstrap::getRequestInstance()->getRequestElement($requestKey);
// Get user instance
$userInstance = Registry::getRegistry()->getInstance('user');
$this->hashedPassword = ObjectFactory::createObjectByConfiguredName('crypto_class')->hashString($plainPassword, $userInstance->getPasswordHash());
// Store the hash back in request
- $this->getRequestInstance()->setRequestElement('pass_hash', $this->hashedPassword);
+ FrameworkBootstrap::getRequestInstance()->setRequestElement('pass_hash', $this->hashedPassword);
} // END - if
}
}
namespace Org\Mxchange\City\Helper\Login;
// Import framework stuff
+use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
use Org\Mxchange\CoreFramework\Registry\Registry;
use Org\Mxchange\CoreFramework\Request\Requestable;
$loginInstance = ObjectFactory::createObjectByName($this->authMethod, array($responseInstance));
// Set user cookie
- $loginInstance->setUserAuth($this->getRequestInstance()->getRequestElement('username'));
+ $loginInstance->setUserAuth(FrameworkBootstrap::getRequestInstance()->getRequestElement('username'));
// Set password cookie
- $loginInstance->setPasswordAuth($this->getRequestInstance()->getRequestElement('pass_hash'));
+ $loginInstance->setPasswordAuth(FrameworkBootstrap::getRequestInstance()->getRequestElement('pass_hash'));
// Remember this login instance for later usage
Registry::getRegistry()->addInstance('login', $loginInstance);
// Own namespace
namespace Org\Mxchange\City\Manager\City;
+// Import application-specific stuff
+use Org\Mxchange\City\Database\Frontend\Information\CityInformationDatabaseWrapper;
+
// Import framework stuff
+use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
+use Org\Mxchange\CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Response\Responseable;
*/
public function foundFirstCity () {
// Check on request instance and 'city_name' element
- assert($this->getRequestInstance() instanceof Requestable);
- assert($this->getRequestInstance()->isRequestElementSet(CityInformationDatabaseWrapper::DB_COLUMN_CITY_NAME));
+ assert(FrameworkBootstrap::getRequestInstance() instanceof Requestable);
+ assert(FrameworkBootstrap::getRequestInstance()->isRequestElementSet(CityInformationDatabaseWrapper::DB_COLUMN_CITY_NAME));
// Get city name
- $cityName = $this->getRequestInstance()->getRequestElement(CityInformationDatabaseWrapper::DB_COLUMN_CITY_NAME);
+ $cityName = FrameworkBootstrap::getRequestInstance()->getRequestElement(CityInformationDatabaseWrapper::DB_COLUMN_CITY_NAME);
// Some pre-checks
assert(!$this->isCityAlreadyFounded());
$regionData = $regionResultInstance->current();
// Add region id from it
- $this->getRequestInstance()->setRequestElement(CityInformationDatabaseWrapper::DB_COLUMN_CITY_REGION_ID, $regionData[RegionInformationDatabaseWrapper::DB_COLUMN_REGION_ID]);
+ FrameworkBootstrap::getRequestInstance()->setRequestElement(CityInformationDatabaseWrapper::DB_COLUMN_CITY_REGION_ID, $regionData[RegionInformationDatabaseWrapper::DB_COLUMN_REGION_ID]);
// Then create the first city
- $this->getWrapperInstance()->createCityByRequest($this->getRequestInstance());
+ $this->getWrapperInstance()->createCityByRequest(FrameworkBootstrap::getRequestInstance());
}
/**
namespace Org\Mxchange\City\Manager\District;
// Import framework stuff
+use Org\Mxchange\CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory;
use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A city districts manager
namespace Org\Mxchange\City\Manager\Lots;
// Import framework stuff
+use Org\Mxchange\CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory;
use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A city lots manager
namespace Org\Mxchange\City\Manager\Sections;
// Import framework stuff
+use Org\Mxchange\CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory;
use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A city sections manager
// Import framework stuff
use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A ??? manager
// Own namespace
namespace Org\Mxchange\City\Manager;
-// Import own stuff
+// Import application-specific stuff
use Org\Mxchange\City\Generic\BaseCitySystem;
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Registry\Registerable;
+
/**
* A general Manager class
*
* 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 BaseManager extends BaseCitySystem implements Manageable, Registerable {
+abstract class BaseManager extends BaseCitySystem implements Manageable, Registerable {
/**
* Protected constructor
*
<?php
+// Own namespace
+namespace Org\Mxchange\City\Manager\Region;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory;
+
/**
* A game manager
*
<?php
+// Own namespace
+namespace Org\Mxchange\City\Manager\Region;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory;
+
/**
* A Region manager
*
<?php
+// Own namespace
+namespace Org\Mxchange\City\Manager\RegionMap;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Factory\Database\Wrapper\DatabaseWrapperFactory;
+
/**
* A region map manager
*
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\Factory\Database\Wrapper\DatabaseWrapperFactory;
use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
use Org\Mxchange\CoreFramework\Request\Requestable;
*/
public function encryptPassword ($requestKey) {
// Check if password is found in request
- if ($this->getRequestInstance()->isRequestElementSet($requestKey)) {
+ if (FrameworkBootstrap::getRequestInstance()->isRequestElementSet($requestKey)) {
// So encrypt the password and store it for later usage in
// the request:
// 1.: Get the plain password
- $plainPassword = $this->getRequestInstance()->getRequestElement($requestKey);
+ $plainPassword = FrameworkBootstrap::getRequestInstance()->getRequestElement($requestKey);
// 2. Get a crypto helper and hash the password
$this->hashedPassword = ObjectFactory::createObjectByConfiguredName('crypto_class')->hashString($plainPassword);
// 3. Store the hash back in request
- $this->getRequestInstance()->setRequestElement('pass_hash', $this->hashedPassword);
+ FrameworkBootstrap::getRequestInstance()->setRequestElement('pass_hash', $this->hashedPassword);
}
}
$actionInstance = ObjectFactory::createObjectByConfiguredName('post_registration_class');
// Execute the action
- $actionInstance->execute($this->getRequestInstance(), $this->getResponseInstance());
+ $actionInstance->execute(FrameworkBootstrap::getRequestInstance(), $this->getResponseInstance());
}
/**
// Do we have an alias?
if (is_string($alias)) {
// Yes, so use it
- $criteriaInstance->addCriteria($alias, $this->getRequestInstance()->getRequestElement($element));
+ $criteriaInstance->addCriteria($alias, FrameworkBootstrap::getRequestInstance()->getRequestElement($element));
// Debug message
- //* DEBUG: */ $this->debugOutput('ALIAS: alias='.$alias.',element='.$element.'='.$this->getRequestInstance()->getRequestElement($element));
+ //* DEBUG: */ $this->debugOutput('ALIAS: alias='.$alias.',element='.$element.'='.FrameworkBootstrap::getRequestInstance()->getRequestElement($element));
} else {
// No, default entry
- $criteriaInstance->addCriteria($element, $this->getRequestInstance()->getRequestElement($element));
+ $criteriaInstance->addCriteria($element, FrameworkBootstrap::getRequestInstance()->getRequestElement($element));
// Debug message
- //* DEBUG: */ $this->debugOutput('DEFAULT: element='.$element.'='.$this->getRequestInstance()->getRequestElement($element));
+ //* DEBUG: */ $this->debugOutput('DEFAULT: element='.$element.'='.FrameworkBootstrap::getRequestInstance()->getRequestElement($element));
}
// Is this a guest account?
- if ((($element == 'username') || ($alias == 'username')) && ($this->getRequestInstance()->getRequestElement($element) == $this->getConfigInstance()->getConfigEntry('guest_login_user'))) {
+ if ((($element == 'username') || ($alias == 'username')) && (FrameworkBootstrap::getRequestInstance()->getRequestElement($element) == $this->getConfigInstance()->getConfigEntry('guest_login_user'))) {
// Yes, then set the config entry to guest status
$configEntry = 'user_status_guest';
} // END - if
// Own namespace
namespace Org\Mxchange\City\State\Active;
-// Import own stuff
+// Import application-specific stuff
use Org\Mxchange\City\Daemon\Factory\CityDaemonFactory;
+use Org\Mxchange\City\State\BaseCityState;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\State\Stateable;
/**
* A active city state class
<?php
+// Own namespace
+namespace Org\Mxchange\City\State\???;
+
+// Import application-specific stuff
+use Org\Mxchange\City\State\BaseCityState;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\State\Stateable;
+
/**
* A ??? city state class
*
<?php
+// Own namespace
+namespace Org\Mxchange\City\State;
+
+// Import application-specific stuff
+use Org\Mxchange\City\State\Init\CityInitState;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\State\BaseState;
+
/**
* A general city state class
*
* 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 BaseCityState extends BaseState {
+abstract class BaseCityState extends BaseState {
/**
* Protected constructor
*
<?php
+// Own namespace
+namespace Org\Mxchange\City\State\Init;
+
+// Import application-specific stuff
+use Org\Mxchange\City\Factory\State\CityStateFactory;
+use Org\Mxchange\City\State\BaseCityState;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Executor\Executor;
+use Org\Mxchange\CoreFramework\State\Stateable;
+
/**
* A init city state class
*
// Own namespace
namespace Org\Mxchange\City\Task;
-// Import own stuff
+// Import application-specific stuff
use Org\Mxchange\City\Helper\CityHelper;
/**
* 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 BaseCityTask extends BaseTask {
+abstract class BaseCityTask extends BaseTask {
/**
* An instance of a city
*/
// Own namespace
namespace Org\Mxchange\City\Daemon\Task\Growth\Building;
-// Import own stuff
+// Import application-specific stuff
use Org\Mxchange\City\Daemon\Factory\CityDaemonFactory;
/**
// Own namespace
namespace Org\Mxchange\City\Daemon\Task\Growth\Household;
-// Import own stuff
+// Import application-specific stuff
use Org\Mxchange\City\Daemon\Factory\CityDaemonFactory;
/**
// Own namespace
namespace Org\Mxchange\City\Daemon\Task\Expander\Map;
-// Import own stuff
+// Import application-specific stuff
use Org\Mxchange\City\Daemon\Factory\CityDaemonFactory;
/**
$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', 'CityInformationDatabaseWrapper');
+$cfg->setConfigEntry('city_info_db_wrapper_class', 'Org\Mxchange\City\Database\Frontend\Information\CityInformationDatabaseWrapper');
// CFG: REGION-INFO-DB-WRAPPER-CLASS
$cfg->setConfigEntry('region_info_db_wrapper_class', 'RegionInformationDatabaseWrapper');
$cfg->setConfigEntry('city_districts_db_wrapper_class', 'CityDistrictsDatabaseWrapper');
// CFG: CITY-INIT-STATE-CLASS
-$cfg->setConfigEntry('city_init_state_class', 'CityInitState');
+$cfg->setConfigEntry('city_init_state_class', 'Org\Mxchange\City\State\Init\CityInitState');
// CFG: CITY-VIRGIN-STATE-CLASS
-$cfg->setConfigEntry('city_virgin_state_class', 'CityVirginState');
+$cfg->setConfigEntry('city_virgin_state_class', 'Org\Mxchange\City\State\Virgin\CityVirginState');
// CFG: CITY-ACTIVE-STATE-CLASS
-$cfg->setConfigEntry('city_active_state_class', 'CityActiveState');
+$cfg->setConfigEntry('city_active_state_class', 'Org\Mxchange\City\State\Active\CityActiveState');
/******************************************************************************
* HTML client *
// Own namespace
namespace Org\Mxchange\City\Database\Frontend\Information;
-// Import own stuff
+// 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;
/**
<?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
*
<?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
*
<?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
*
<?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
*
<?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
*
<?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
*
/**
* Method to "bootstrap" the city. This step does also apply provided
* command-line arguments stored in the request instance. You should now
- * get it from calling $this->getRequestInstance().
+ * get it from calling FrameworkBootstrap::getRequestInstance().
*
* @return void
*/
-Subproject commit edbaec7aa8e1019d10b7a3351e1629fed93740f4
+Subproject commit 2882b57ca6f372b822f96034ff2fe6aafd7daeb8