]> git.mxchange.org Git - city.git/commitdiff
They don't need map expansion:
authorRoland Haeder <roland@mxchange.org>
Tue, 25 Aug 2015 19:47:07 +0000 (21:47 +0200)
committerRoland Haeder <roland@mxchange.org>
Tue, 25 Aug 2015 19:47:07 +0000 (21:47 +0200)
- Lots don't get expanded by the daemon, the user just sets it and the daemon
  validates and executes the "expansion".
- Also districts don't get expanded for the same reason.

Signed-off-by: Roland Haeder <roland@mxchange.org>
application/city/classes/manager/city_entities/districts/class_CityDistrictsManager.php
application/city/classes/manager/city_entities/lots/class_CityLotsManager.php
application/city/interfaces/manager/city_entities/class_ManageableCityEntities.php

index a02921408f3bfe57319943a4ac7555dee93817a7..3e921ee0ecac6390f66bccf6fdb0ce5f59df4124 100644 (file)
@@ -50,52 +50,6 @@ class CityDistrictsManager extends BaseFrameworkSystem implements ManageableCity
                // Return the prepared instance
                return $managerInstance;
        }
-
-       /**
-        * Checks whether at least one map requires expansion
-        *
-        * @return      $requiresExpansion      Whether a map requires expansion
-        * @todo        0% done
-        */
-       public function isMapPendingExpansion () {
-               // Default is no expansion is needed
-               $requireExpansion = FALSE;
-
-               // First, a simple check if the districts table contains any entries at all
-               if ($this->getWrapperInstance()->countTotalRows() == 0) {
-                       // This definedly requires expansion
-                       $requireExpansion = TRUE;
-               } // END - if
-
-               // Return status
-               return $requireExpansion;
-       }
-
-       /**
-        * Expands any map that requires expansion
-        *
-        * @return      void
-        * @todo ~10% done
-        * @todo z-coordinate not used
-        */
-       public function expandMaps () {
-               // Get a city info wrapper instance
-               $cityWrapperInstance = DatabaseWrapperFactory::createWrapperByConfiguredName('city_info_db_wrapper_class');
-
-               // Get all city ids from it
-               $cityIds = $cityWrapperInstance->getAllCityIds();
-
-               // Now check all ids
-               foreach ($cityIds as $cityId) {
-                       // Does this id have any districts
-                       if (!$this->getWrapperInstance()->ifCityHasDistricts($cityId)) {
-                               // Nothing found, so it is a brand-new city that needs first initialization
-                               $districts = $this->getWrapperInstance()->doInitialCityExpansion($cityId);
-                       } else {
-                               // @TODO Maybe some expansion is needed
-                       }
-               } // END - foreach
-       }
 }
 
 // [EOF]
index f4a7e982b2d16313c98c800afc16cf54dfbfaa20..f38d1da22e0072d79420d2756019a40bfcd25c4c 100644 (file)
@@ -50,52 +50,6 @@ class CityLotsManager extends BaseFrameworkSystem implements ManageableCityLots,
                // Return the prepared instance
                return $managerInstance;
        }
-
-       /**
-        * Checks whether at least one map requires expansion
-        *
-        * @return      $requiresExpansion      Whether a map requires expansion
-        * @todo        0% done
-        */
-       public function isMapPendingExpansion () {
-               // Default is no expansion is needed
-               $requireExpansion = FALSE;
-
-               // First, a simple check if the lots table contains any entries at all
-               if ($this->getWrapperInstance()->countTotalRows() == 0) {
-                       // This definedly requires expansion
-                       $requireExpansion = TRUE;
-               } // END - if
-
-               // Return status
-               return $requireExpansion;
-       }
-
-       /**
-        * Expands any map that requires expansion
-        *
-        * @return      void
-        * @todo ~10% done
-        * @todo z-coordinate not used
-        */
-       public function expandMaps () {
-               // Get a city info wrapper instance
-               $cityWrapperInstance = DatabaseWrapperFactory::createWrapperByConfiguredName('city_info_db_wrapper_class');
-
-               // Get all city ids from it
-               $cityIds = $cityWrapperInstance->getAllCityIds();
-
-               // Now check all ids
-               foreach ($cityIds as $cityId) {
-                       // Does this id have any lots
-                       if (!$this->getWrapperInstance()->ifCityHasLots($cityId)) {
-                               // Nothing found, so it is a brand-new city that needs first initialization
-                               $lots = $this->getWrapperInstance()->doInitialCityExpansion($cityId);
-                       } else {
-                               // @TODO Maybe some expansion is needed
-                       }
-               } // END - foreach
-       }
 }
 
 // [EOF]
index 127201a174246e966e8710e8d1b8a50b145df4c4..8c68118da0b386213803b02acc461b4f71dc320d 100644 (file)
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 interface ManageableCityEntities extends Manageable {
-       /**
-        * Checks whether at least one map requires expansion
-        *
-        * @return      $requiresExpansion      Whether a map requires expansion
-        */
-       function isMapPendingExpansion ();
-
-       /**
-        * Expands any map that requires expansion
-        *
-        * @return      void
-        */
-       function expandMaps ();
 }
 
 // [EOF]