]> git.mxchange.org Git - city.git/blob - application/city/interfaces/helper/city/class_CityHelper.php
Continued:
[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\Request\Requestable;
7 use Org\Mxchange\CoreFramework\Response\Responseable;
8
9 /**
10  * An interface for "city-helper" classes
11  *
12  * @author              Roland Haeder <webmaster@shipsimu.org>
13  * @version             0.0.0
14  * @copyright   Copyright (c) 2015, 2016 City Developer Team
15  * @license             GNU GPL 3.0 or any newer version
16  * @link                http://www.shipsimu.org
17  *
18  * This program is free software: you can redistribute it and/or modify
19  * it under the terms of the GNU General Public License as published by
20  * the Free Software Foundation, either version 3 of the License, or
21  * (at your option) any later version.
22  *
23  * This program is distributed in the hope that it will be useful,
24  * but WITHOUT ANY WARRANTY; without even the implied warranty of
25  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26  * GNU General Public License for more details.
27  *
28  * You should have received a copy of the GNU General Public License
29  * along with this program. If not, see <http://www.gnu.org/licenses/>.
30  */
31 interface CityHelper extends Helper, AddableCriteria {
32         /**
33          * Initializes the city daemon
34          *
35          * @return      void
36          */
37         function bootstrapInitCityDaemon ();
38
39         /**
40          * Method to "bootstrap" the city. This step does also apply provided
41          * command-line arguments stored in the request instance. You should now
42          * get it from calling $this->getRequestInstance().
43          *
44          * @return      void
45          */
46         function doBootstrapping ();
47
48         /**
49          * Outputs the console teaser. This should only be executed on startup or
50          * full restarts. This method generates some space around the teaser.
51          *
52          * @return      void
53          */
54         function outputConsoleTeaser ();
55
56         /**
57          * Add some city-specific filters
58          *
59          * @return      void
60          */
61         function addExtraCityFilters ();
62
63         /**
64          * Activates the city daemon by doing some final preparation and setting
65          * $cityIsActive to TRUE.
66          *
67          * @param       $requestInstance        A Requestable class
68          * @param       $responseInstance       A Responseable class
69          * @return      void
70          */
71         function activateCityDaemon (Requestable $requestInstance, Responseable $responseInstance);
72
73         /**
74          * Updates/refreshes city data (e.g. state).
75          *
76          * @return      void
77          */
78         function updateCityData ();
79
80         /**
81          * Adds extra tasks to the given handler for this city
82          *
83          * @param       $handlerInstance        An instance of a HandleableTask class
84          * @return      void
85          */
86         function addExtraTasks (HandleableTask $handlerInstance);
87
88         /**
89          * Checks whether at least one map requires expansion
90          *
91          * @return      $requiresExpansion      Whether a map requires expansion
92          */
93         function isMapPendingExpansion ();
94 }