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