3 namespace Org\Mxchange\City\Daemon\Simulation;
6 use Org\Mxchange\City\Daemon\BaseCityDaemon;
8 // Import framework stuff
9 use Org\Mxchange\CoreFramework\Request\Requestable;
12 * The default city daemon
14 * @author Roland Haeder <webmaster@shipsimu.org>
16 * @copyright Copyright (c) 2015, 2016 City Developer Team
17 * @license GNU GPL 3.0 or any newer version
18 * @link http://www.shipsimu.org
20 * This program is free software: you can redistribute it and/or modify
21 * it under the terms of the GNU General Public License as published by
22 * the Free Software Foundation, either version 3 of the License, or
23 * (at your option) any later version.
25 * This program is distributed in the hope that it will be useful,
26 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 * GNU General Public License for more details.
30 * You should have received a copy of the GNU General Public License
31 * along with this program. If not, see <http://www.gnu.org/licenses/>.
33 class SimulationDefaultCityDaemon extends BaseCityDaemon implements CityHelper, Registerable {
35 * Protected constructor
39 protected function __construct () {
40 // Call parent constructor
41 parent::__construct(__CLASS__);
45 * Creates an instance of this hub-node class
47 * @param $requestInstance An instance of a Requestable class
48 * @return $nodeInstance An instance of this hub-node class
50 public static final function createSimulationDefaultCityDaemon (Requestable $requestInstance) {
52 $nodeInstance = new SimulationDefaultCityDaemon();
54 // Set the request instance
55 $nodeInstance->setRequestInstance($requestInstance);
57 // Return the instance
62 * Method to "bootstrap" the city simulation. This step does also apply
63 * provided command-line arguments stored in the request instance.
66 * @todo Implement this method
68 public function doBootstrapping () {
73 * Add some node-specific filters
77 public function addExtraCityFilters () {
78 // Get the application instance from registry
79 $applicationInstance = Registry::getRegistry()->getInstance('app');
81 // Get the controller from the application
82 $controllerInstance = $applicationInstance->getControllerInstance();
85 // @TODO $controllerInstance->addActivationFilter(ObjectFactory::createObjectByConfiguredName('city_foo_task_filter'));
87 // @TODO Add some filters here
88 $this->partialStub('Add some filters here.');
92 * Adds extra tasks to the given handler for this node
94 * @param $handlerInstance An instance of a HandleableTask class
98 public function addExtraTasks (HandleableTask $handlerInstance) {
99 $this->partialStub('Please add some tasks or empty this method.');