namespace Org\Mxchange\City\Command;
// Import application-specific stuff
-use Org\Mxchange\City\Daemon\Factory\CityDaemonFactory;
+use Org\Mxchange\Factory\City\Daemon\CityDaemonFactory;
// Import framework stuff
use Org\Mxchange\CoreFramework\Command\BaseCommand;
use Org\Mxchange\CoreFramework\Command\Commandable;
use Org\Mxchange\CoreFramework\Controller\Controller;
-use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
-use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
+use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
+use Org\Mxchange\CoreFramework\Registry\Object\ObjectRegistry;
use Org\Mxchange\CoreFramework\Request\Requestable;
use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
use Org\Mxchange\CoreFramework\Response\Responseable;
*
* @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
- * @copyright Copyright (c) 2015, 2016 City Developer Team
+ * @copyright Copyright (c) 2015 - 2023 City Developer Team
* @license GNU GPL 3.0 or any newer version
* @link http://www.shipsimu.org
*
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get a registry and the application instance from it
- $applicationInstance = GenericRegistry::getRegistry()->getInstance('application');
+ $applicationInstance = ApplicationHelper::getSelfInstance();
/*
* ----------------------- Bootstrapping phase ------------------------
* extra arguments which mostly override config entries or enable special
* features within the hub (none is ready at this development stage)
*/
- self::createDebugInstance(__CLASS__)->debugOutput('BOOTSTRAP: Beginning with bootstrap...');
+ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage('BOOTSTRAP: Beginning with bootstrap...');
$applicationInstance->getControllerInstance()->executeBootstrapFilters($requestInstance, $responseInstance);
- self::createDebugInstance(__CLASS__)->debugOutput('BOOTSTRAP: Bootstrap finished.');
+ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage('BOOTSTRAP: Bootstrap finished.');
// Get city instance
$cityInstance = CityDaemonFactory::createCityDaemonInstance();
$cityInstance->activateCityDaemon($requestInstance, $responseInstance);
// Get task handler instance
- $handlerInstance = GenericRegistry::getRegistry()->getInstance('task_handler');
+ $handlerInstance = ObjectRegistry::getRegistry('generic')->getInstance('task_handler');
// Debug message
- self::createDebugInstance(__CLASS__)->debugOutput('MAIN: --- Entering main loop. ---');
+ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage('MAIN: --- Entering main loop. ---');
/*
* ----------------------------- Main loop ----------------------------
while (($cityInstance->isCityActive()) && ($handlerInstance->hasTasksLeft())) {
// Handle all tasks here
$handlerInstance->handleTasks();
- } // END - while
+ }
// Debug message
- self::createDebugInstance(__CLASS__)->debugOutput('MAIN: --- Leaving main loop. ---');
+ self::createDebugInstance(__CLASS__, __LINE__)->debugMessage('MAIN: --- Leaving main loop. ---');
}
/**