]> git.mxchange.org Git - city.git/blob - application/city/classes/city_daemon/class_
Next wave:
[city.git] / application / city / classes / city_daemon / class_
1 <?php
2 // Own namespace
3 namespace Org\Mxchange\City\Daemon\Simulation;
4
5 // Import own stuff
6 use Org\Mxchange\City\Helper\CityHelper;
7
8 // Import framework stuff
9 use Org\Mxchange\CoreFramework\Handler\Task\HandleableTask;
10 use Org\Mxchange\CoreFramework\Request\Requestable;
11
12 /**
13  * A hub-node class for the '???' mode
14  *
15  * @author              Roland Haeder <webmaster@ship-simu.org>
16  * @version             0.0.0
17  * @copyright   Copyright (c) 2015, 2016 City Developer Team
18  * @license             GNU GPL 3.0 or any newer version
19  * @link                http://www.ship-simu.org
20  *
21  * This program is free software: you can redistribute it and/or modify
22  * it under the terms of the GNU General Public License as published by
23  * the Free Software Foundation, either version 3 of the License, or
24  * (at your option) any later version.
25  *
26  * This program is distributed in the hope that it will be useful,
27  * but WITHOUT ANY WARRANTY; without even the implied warranty of
28  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
29  * GNU General Public License for more details.
30  *
31  * You should have received a copy of the GNU General Public License
32  * along with this program. If not, see <http://www.gnu.org/licenses/>.
33  */
34 class Simulation???CityDaemon extends BaseCity implements CityHelper, Registerable {
35         /**
36          * Protected constructor
37          *
38          * @return      void
39          */
40         protected function __construct () {
41                 // Call parent constructor
42                 parent::__construct(__CLASS__);
43         }
44
45         /**
46          * Creates an instance of this hub-node class
47          *
48          * @param       $requestInstance        An instance of a Requestable class
49          * @return      $nodeInstance           An instance of this hub-node class
50          */
51         public final static function createSimulation???CityDaemon (Requestable $requestInstance) {
52                 // Get a new instance
53                 $nodeInstance = new Simulation???CityDaemon();
54
55                 // Set the request instance
56                 $nodeInstance->setRequestInstance($requestInstance);
57
58                 // Return the instance
59                 return $nodeInstance;
60         }
61
62         /**
63          * Method to "bootstrap" the node. This step does also apply provided
64          * command-line arguments stored in the request instance. The regular node
65          * should communicate with the bootstrap-nodes at this point.
66          *
67          * @return      void
68          * @todo        Implement this method
69          */
70         public function doBootstrapping () {
71                 // Call generic (parent) bootstrapping method first
72                 parent::doGenericBootstrapping();
73                 $this->partialStub('Please implement this method.');
74         }
75
76         /**
77          * Initializes hub-specific queues
78          *
79          * @return      void
80          * @todo        Implement this method
81          */
82         public function initQueues () {
83                 $this->partialStub('Please implement this method.');
84         }
85
86         /**
87          * Add some node-specific filters
88          *
89          * @return      void
90          */
91         public function addExtraCityFilters () {
92                 // Add some filters here
93         }
94
95         /**
96          * Adds extra tasks to the given handler for this node
97          *
98          * @param       $handlerInstance        An instance of a HandleableTask class
99          * @return      void
100          * @todo        0% done
101          */
102         public function addExtraTasks (HandleableTask $handlerInstance) {
103                 $this->partialStub('Please add some tasks or empty this method.');
104         }
105 }