]> git.mxchange.org Git - city.git/commitdiff
Added city map manager + own interface + expanded interface
authorRoland Haeder <roland@mxchange.org>
Wed, 1 Jul 2015 01:09:18 +0000 (03:09 +0200)
committerRoland Haeder <roland@mxchange.org>
Wed, 1 Jul 2015 01:09:18 +0000 (03:09 +0200)
Signed-off-by: Roland Haeder <roland@mxchange.org>
application/city/interfaces/helper/city/class_CityHelper.php
application/city/interfaces/manager/map/.htaccess [new file with mode: 0644]
application/city/interfaces/manager/map/class_ManageableMap.php [new file with mode: 0644]
application/city/main/city_daemon/class_BaseCityDaemon.php
application/city/main/manager/city_map/.htaccess [new file with mode: 0644]
application/city/main/manager/city_map/class_CityMapManager.php [new file with mode: 0644]
application/city/main/manager/class_

index 2883ae6e84213f6d62035111ef42357e62a65227..83321b1e6b018e82505d310625ecfd947fa0779e 100644 (file)
@@ -77,6 +77,13 @@ interface CityHelper extends Helper, AddableCriteria {
         * @return      void
         */
        function addExtraTasks (HandleableTask $handlerInstance);
+
+       /**
+        * Checks whether at least one map requires expansion
+        *
+        * @return      $requiresExpansion      Whether a map requires expansion
+        */
+       function isMapPendingExpansion ();
 }
 
 // [EOF]
diff --git a/application/city/interfaces/manager/map/.htaccess b/application/city/interfaces/manager/map/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/city/interfaces/manager/map/class_ManageableMap.php b/application/city/interfaces/manager/map/class_ManageableMap.php
new file mode 100644 (file)
index 0000000..fdea29d
--- /dev/null
@@ -0,0 +1,28 @@
+<?php
+/**
+ * An interface map manager
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2015 City Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+interface ManageableMap extends FrameworkInterface {
+}
+
+// [EOF]
+?>
index 23d7facf4654432a597742a1406118aadcb87f2b..3aeadce70609c3b45a2e259c6c892594a1f08f94 100644 (file)
@@ -249,6 +249,19 @@ class BaseCityDaemon extends BaseCitySystem implements Updateable, AddableCriter
        public function bootstrapInitCityDaemon () {
                $this->partialStub('Please add something here.');
        }
+
+       /**
+        * Checks whether at least one map requires expansion
+        *
+        * @return      $requiresExpansion      Whether a map requires expansion
+        * @todo        0% done
+        */
+       public function isMapPendingExpansion () {
+               // Get map manager
+               $mapInstance = ManagerFactory::createManagerByType('city_map');
+
+               $this->partialStub('Please add something here.');
+       }
 }
 
 // [EOF]
diff --git a/application/city/main/manager/city_map/.htaccess b/application/city/main/manager/city_map/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/city/main/manager/city_map/class_CityMapManager.php b/application/city/main/manager/city_map/class_CityMapManager.php
new file mode 100644 (file)
index 0000000..2b5cbe1
--- /dev/null
@@ -0,0 +1,50 @@
+<?php
+/**
+ * A city map manager
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2015 City Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+class CityMapManager extends BaseFrameworkSystem implements ManageableMap, Registerable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of this class
+        *
+        * @return      $managerInstance        An instance of a ManageableMap class
+        */
+       public final static function createCityMapManager () {
+               // Get new instance
+               $managerInstance = new CityMapManager();
+
+               // Return the prepared instance
+               return $managerInstance;
+       }
+}
+
+// [EOF]
+?>
index e302a4b8f7efe60485dff9c180f385d8c2d6cdfa..be19c93a335cecd432da4391331b9dba99355de8 100644 (file)
@@ -21,7 +21,7 @@
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
-class ???Manager extends BaseFrameworkSystem implements Manageable??? {
+class ???Manager extends BaseFrameworkSystem implements Manageable???, Registerable {
        /**
         * Protected constructor
         *