3 namespace Org\Mxchange\City\Helper;
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;
13 * An interface for "city-helper" classes
15 * @author Roland Haeder <webmaster@shipsimu.org>
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
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.
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.
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/>.
34 interface CityHelper extends Helper, AddableCriteria {
36 * Initializes the city daemon
40 function bootstrapInitCityDaemon ();
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().
49 function doBootstrapping ();
52 * Outputs the console teaser. This should only be executed on startup or
53 * full restarts. This method generates some space around the teaser.
57 function outputConsoleTeaser ();
60 * Add some city-specific filters
64 function addExtraCityFilters ();
67 * Activates the city daemon by doing some final preparation and setting
68 * $cityIsActive to TRUE.
70 * @param $requestInstance A Requestable class
71 * @param $responseInstance A Responseable class
74 function activateCityDaemon (Requestable $requestInstance, Responseable $responseInstance);
77 * Updates/refreshes city data (e.g. state).
81 function updateCityData ();
84 * Adds extra tasks to the given handler for this city
86 * @param $handlerInstance An instance of a HandleableTask class
89 function addExtraTasks (HandleableTask $handlerInstance);
92 * Checks whether at least one map requires expansion
94 * @return $requiresExpansion Whether a map requires expansion
96 function isMapPendingExpansion ();