]> git.mxchange.org Git - city.git/blob - application/city/interfaces/helper/city/class_CityHelper.php
Next wave:
[city.git] / application / city / interfaces / helper / city / class_CityHelper.php
1 <?php
2 // Own namespace
3 namespace Org\Mxchange\City\Helper;
4
5 // Import framework stuff
6 use Org\Mxchange\CoreFramework\Criteria\Add\AddableCriteria;
7 use Org\Mxchange\CoreFramework\Handler\Task\HandleableTask;
8 use Org\Mxchange\CoreFramework\Helper\Helper;
9 use Org\Mxchange\CoreFramework\Request\Requestable;
10 use Org\Mxchange\CoreFramework\Response\Responseable;
11
12 /**
13  * An interface for "city-helper" classes
14  *
15  * @author              Roland Haeder <webmaster@shipsimu.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.shipsimu.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 interface CityHelper extends Helper, AddableCriteria {
35         /**
36          * Initializes the city daemon
37          *
38          * @return      void
39          */
40         function bootstrapInitCityDaemon ();
41
42         /**
43          * Method to "bootstrap" the city. This step does also apply provided
44          * command-line arguments stored in the request instance. You should now
45          * get it from calling $this->getRequestInstance().
46          *
47          * @return      void
48          */
49         function doBootstrapping ();
50
51         /**
52          * Outputs the console teaser. This should only be executed on startup or
53          * full restarts. This method generates some space around the teaser.
54          *
55          * @return      void
56          */
57         function outputConsoleTeaser ();
58
59         /**
60          * Add some city-specific filters
61          *
62          * @return      void
63          */
64         function addExtraCityFilters ();
65
66         /**
67          * Activates the city daemon by doing some final preparation and setting
68          * $cityIsActive to TRUE.
69          *
70          * @param       $requestInstance        A Requestable class
71          * @param       $responseInstance       A Responseable class
72          * @return      void
73          */
74         function activateCityDaemon (Requestable $requestInstance, Responseable $responseInstance);
75
76         /**
77          * Updates/refreshes city data (e.g. state).
78          *
79          * @return      void
80          */
81         function updateCityData ();
82
83         /**
84          * Adds extra tasks to the given handler for this city
85          *
86          * @param       $handlerInstance        An instance of a HandleableTask class
87          * @return      void
88          */
89         function addExtraTasks (HandleableTask $handlerInstance);
90
91         /**
92          * Checks whether at least one map requires expansion
93          *
94          * @return      $requiresExpansion      Whether a map requires expansion
95          */
96         function isMapPendingExpansion ();
97 }