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