]> git.mxchange.org Git - city.git/blobdiff - application/city/classes/city_daemon/class_BaseCityDaemon.php
Next wave:
[city.git] / application / city / classes / city_daemon / class_BaseCityDaemon.php
index 8584bebd2ac0ce840de6d382b2585e94f53ab6c7..9d7302a9b76d7ef44f6a316e6463bb8802bae5de 100644 (file)
@@ -1,10 +1,25 @@
 <?php
+// Own namespace
+namespace Org\Mxchange\City\Daemon;
+
+// Import own stuff
+use Org\Mxchange\City\Generic\BaseCitySystem;
+
+// Import framework stuff
+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\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
+
 /**
  * A general City class
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2015 City Developer Team
+ * @copyright  Copyright (c) 2015, 2016 City Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -85,7 +100,7 @@ class BaseCityDaemon extends BaseCitySystem implements Updateable, AddableCriter
                // 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('Copyright (c) 2015 City Developer Team');
+               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.');
                self::createDebugInstance(__CLASS__)->debugOutput('This is free software, and you are welcome to redistribute it under certain');
@@ -110,21 +125,6 @@ class BaseCityDaemon extends BaseCitySystem implements Updateable, AddableCriter
 
                // Add the City id
                $criteriaInstance->addCriteria(CityInformationDatabaseWrapper::DB_COLUMN_CITY_ID, $this->getCityId());
-
-               // Add the session id if acquired
-               if ($this->getSessionId() != '') {
-                       $criteriaInstance->addCriteria(CityInformationDatabaseWrapper::DB_COLUMN_SESSION_ID, $this->getSessionId());
-               } // END - if
-
-               // Add the private key if acquired
-               if ($this->getPrivateKey() != '') {
-                       $criteriaInstance->addCriteria(CityInformationDatabaseWrapper::DB_COLUMN_PRIVATE_KEY, base64_encode($this->getPrivateKey()));
-                       $criteriaInstance->addCriteria(CityInformationDatabaseWrapper::DB_COLUMN_PRIVATE_KEY_HASH, $this->getPrivateKeyHash());
-               } // END - if
-
-               // Add own external and internal addresses as UNLs
-               $criteriaInstance->addCriteria(CityInformationDatabaseWrapper::DB_COLUMN_INTERNAL_UNL, CityTools::determineOwnInternalAddress());
-               $criteriaInstance->addCriteria(CityInformationDatabaseWrapper::DB_COLUMN_EXTERNAL_UNL, CityTools::determineOwnExternalAddress());
        }
 
        /**
@@ -138,7 +138,7 @@ class BaseCityDaemon extends BaseCitySystem implements Updateable, AddableCriter
         */
        public function updateDatabaseField ($fieldName, $fieldValue) {
                // Unfinished
-               $this->partialStub('Unfinished!');
+               $this->partialStub('Unfinished: fieldName=' . $fieldName . ',fieldValue=' . $fieldValue);
                return;
 
                // Get a critieria instance
@@ -256,6 +256,8 @@ class BaseCityDaemon extends BaseCitySystem implements Updateable, AddableCriter
         * @return      $requiresExpansion      Whether a map requires expansion
         */
        public function isMapPendingExpansion () {
+               // @TODO Is the game paused by user?
+
                // Get sections manager
                $sectionsInstance = ManagerFactory::createManagerByType('city_sections');
 
@@ -276,6 +278,3 @@ class BaseCityDaemon extends BaseCitySystem implements Updateable, AddableCriter
                $sectionsInstance->expandMaps();
        }
 }
-
-// [EOF]
-?>