From: Roland Haeder Date: Mon, 29 Jun 2015 03:33:48 +0000 (+0200) Subject: Use more the factory. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=380982a5ec0680066d58720544ec161d3d382468;p=city.git Use more the factory. Signed-off-by: Roland Haeder --- diff --git a/application/city/main/factories/states/city/class_CityStateFactory.php b/application/city/main/factories/states/city/class_CityStateFactory.php index 6a7794a..64c42d8 100644 --- a/application/city/main/factories/states/city/class_CityStateFactory.php +++ b/application/city/main/factories/states/city/class_CityStateFactory.php @@ -47,7 +47,7 @@ class CityStateFactory extends ObjectFactory { $stateInstance = self::createObjectByConfiguredName($className); // Get city instance - $cityInstance = Registry::getRegistry()->getInstance('city'); + $cityInstance = CityDaemonObjectFactory::createCityDaemonInstance(); // Debug message self::createDebugInstance(__CLASS__)->debugOutput('CITY-STATE-FACTORY[' . __METHOD__ . ':' . __LINE__ . ']: City state has changed from ' . $cityInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . '.'); diff --git a/application/city/main/filter/bootstrap/init/class_CityDaemonBootstrapInitDaemonFilter.php b/application/city/main/filter/bootstrap/init/class_CityDaemonBootstrapInitDaemonFilter.php index 842f620..69c20ca 100644 --- a/application/city/main/filter/bootstrap/init/class_CityDaemonBootstrapInitDaemonFilter.php +++ b/application/city/main/filter/bootstrap/init/class_CityDaemonBootstrapInitDaemonFilter.php @@ -56,7 +56,7 @@ class CityDaemonBootstrapInitDaemonFilter extends BaseCityFilter implements Filt */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get city instance - $cityInstance = Registry::getRegistry()->getInstance('city'); + $cityInstance = CityDaemonObjectFactory::createCityDaemonInstance(); // Now bootstrap the daemon $cityInstance->bootstrapInitCityDaemon();