]> git.mxchange.org Git - city.git/blobdiff - application/city/classes/city_daemon/class_BaseCityDaemon.php
Continued:
[city.git] / application / city / classes / city_daemon / class_BaseCityDaemon.php
index 3ba704732991e02b5c617c43635bad028fa2d1ff..667eaac1801dac0db015196fb568525b85604d5e 100644 (file)
@@ -2,7 +2,20 @@
 // Own namespace
 namespace Org\Mxchange\City\Daemon;
 
+// Import application-specific stuff
+use Org\Mxchange\City\Factory\Manager\ManagerFactory;
+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\GenericRegistry;;
 use Org\Mxchange\CoreFramework\Request\Requestable;
 use Org\Mxchange\CoreFramework\Response\Responseable;
 
@@ -28,7 +41,7 @@ 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 BaseCityDaemon extends BaseCitySystem implements Updateable, AddableCriteria {
+abstract class BaseCityDaemon extends BaseCitySystem implements Updateable, AddableCriteria {
        /**
         * City types
         */
@@ -63,7 +76,7 @@ class BaseCityDaemon extends BaseCitySystem implements Updateable, AddableCriter
                $this->setCryptoInstance($cryptoInstance);
 
                // Add own instance to registry
-               Registry::getRegistry()->addInstance('city', $this);
+               GenericRegistry::getRegistry()->addInstance('city', $this);
 
                // Init state which sets the state to 'init'
                $this->initState();
@@ -91,7 +104,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($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.');
@@ -166,7 +179,7 @@ class BaseCityDaemon extends BaseCitySystem implements Updateable, AddableCriter
         */
        public function activateCityDaemon (Requestable $requestInstance, Responseable $responseInstance) {
                // Get the controller here
-               $controllerInstance = Registry::getRegistry()->getInstance('controller');
+               $controllerInstance = GenericRegistry::getRegistry()->getInstance('controller');
 
                // Run all filters for the City activation
                $controllerInstance->executeActivationFilters($requestInstance, $responseInstance);