]> git.mxchange.org Git - city.git/blobdiff - application/city/main/city/class_BaseCity.php
Renamed exception (in 'core') + updated 'core'.
[city.git] / application / city / main / city / class_BaseCity.php
index aa3d1eed8830f3d4a79ebe48f7b6ca14376e9de1..e6243f5d8114f40dc8b283fd30b7cf728e5dd878 100644 (file)
@@ -175,8 +175,12 @@ class BaseCity extends BaseCitySystem implements Updateable, AddableCriteria {
                // Run all filters for the City activation
                $controllerInstance->executeActivationFilters($requestInstance, $responseInstance);
 
+               // Make sure the city's state is 'virigin'
+               assert($this->getStateInstance()->validateCityStateIsVirgin() === TRUE);
+
                // ----------------------- Last step from here ------------------------
                // Activate the City. This is ALWAYS the last step in this method
+               /* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CITY[' . __METHOD__ . ':' . __LINE__ . ']: state=' . $this->getStateInstance()->__toString());
                $this->getStateInstance()->citySimulationIsActivated();
                // ---------------------- Last step until here ------------------------
        }
@@ -227,7 +231,7 @@ class BaseCity extends BaseCitySystem implements Updateable, AddableCriteria {
                                $dataSetInstance->addCriteria($element, $cityData[$element]);
                        } else {
                                // Output warning message
-                               /* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('City[' . __METHOD__ . ':' . __LINE__ . ']: addArrayToDataSet(): Element ' . $element . ' not found in CityData array.');
+                               /* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CITY[' . __METHOD__ . ':' . __LINE__ . ']: addArrayToDataSet(): Element ' . $element . ' not found in CityData array.');
                        }
                } // END - foreac
        }