From 5331c3609cdca16f8c3b784cfe33bddfb186d276 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 17 Aug 2012 18:28:37 +0000 Subject: [PATCH] Added interface HandleableAnswerStatus and class AnnouncementAnswerOkayHandler (unfinished) --- .gitattributes | 3 + .../handler/answer-status/.htaccess | 1 + .../class_HandleableAnswerStatus.php | 35 +++++++++++ .../class_AnnouncementAnswerOkayHandler.php | 63 +++++++++++++++++++ .../hub/main/handler/answer-status/class_ | 10 +++ 5 files changed, 112 insertions(+) create mode 100644 application/hub/interfaces/handler/answer-status/.htaccess create mode 100644 application/hub/interfaces/handler/answer-status/class_HandleableAnswerStatus.php create mode 100644 application/hub/main/handler/answer-status/announcement/class_AnnouncementAnswerOkayHandler.php diff --git a/.gitattributes b/.gitattributes index da449391a..64ccc8722 100644 --- a/.gitattributes +++ b/.gitattributes @@ -56,6 +56,8 @@ application/hub/interfaces/executor/class_Executor.php svneol=native#text/plain application/hub/interfaces/filter/.htaccess -text svneol=unset#text/plain application/hub/interfaces/filter/class_FilterablePackage.php svneol=native#text/plain application/hub/interfaces/handler/.htaccess -text svneol=unset#text/plain +application/hub/interfaces/handler/answer-status/.htaccess -text svneol=unset#text/plain +application/hub/interfaces/handler/answer-status/class_HandleableAnswerStatus.php svneol=native#text/plain application/hub/interfaces/handler/chunks/.htaccess -text svneol=unset#text/plain application/hub/interfaces/handler/chunks/class_HandleableChunks.php svneol=native#text/plain application/hub/interfaces/handler/class_Handleable.php svneol=native#text/plain @@ -302,6 +304,7 @@ application/hub/main/filter/task/node/class_NodeTaskHandlerInitializerFilter.php application/hub/main/handler/.htaccess -text svneol=unset#text/plain application/hub/main/handler/answer-status/.htaccess -text svneol=unset#text/plain application/hub/main/handler/answer-status/announcement/.htaccess -text svneol=unset#text/plain +application/hub/main/handler/answer-status/announcement/class_AnnouncementAnswerOkayHandler.php svneol=native#text/plain application/hub/main/handler/answer-status/class_ svneol=native#text/plain application/hub/main/handler/answer-status/class_BaseAnserStatusHandler.php svneol=native#text/plain application/hub/main/handler/chunks/.htaccess -text svneol=unset#text/plain diff --git a/application/hub/interfaces/handler/answer-status/.htaccess b/application/hub/interfaces/handler/answer-status/.htaccess new file mode 100644 index 000000000..3a4288278 --- /dev/null +++ b/application/hub/interfaces/handler/answer-status/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/hub/interfaces/handler/answer-status/class_HandleableAnswerStatus.php b/application/hub/interfaces/handler/answer-status/class_HandleableAnswerStatus.php new file mode 100644 index 000000000..6044e868c --- /dev/null +++ b/application/hub/interfaces/handler/answer-status/class_HandleableAnswerStatus.php @@ -0,0 +1,35 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub 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 . + */ +interface HandleableAnswerStatus extends Handleable { + /** + * Handles given message data array + * + * @param $messageData An array of message data + * @return void + */ + function handleAnswerMessageData (array $messageData); +} + +// [EOF] +?> diff --git a/application/hub/main/handler/answer-status/announcement/class_AnnouncementAnswerOkayHandler.php b/application/hub/main/handler/answer-status/announcement/class_AnnouncementAnswerOkayHandler.php new file mode 100644 index 000000000..d9cc21b23 --- /dev/null +++ b/application/hub/main/handler/answer-status/announcement/class_AnnouncementAnswerOkayHandler.php @@ -0,0 +1,63 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub 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 . + */ +class AnnouncementAnswerOkayHandler extends BaseAnserStatusHandler implements HandleableAnswerStatus, Registerable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + + // Set handler name + $this->setHandlerName('answer_okay'); + } + + /** + * Creates an instance of this class + * + * @return $handlerInstance An instance of a HandleableMessage class + */ + public final static function createAnnouncementAnswerOkayHandler () { + // Get new instance + $handlerInstance = new AnnouncementAnswerOkayHandler(); + + // Return the prepared instance + return $handlerInstance; + } + + /** + * Handles given message data array + * + * @param $messageData An array of message data + * @return void + */ + public function handleAnswerMessageData (array $messageData) { + $this->partialStub('Please implement this method.'); + } +} + +// [EOF] +?> diff --git a/application/hub/main/handler/answer-status/class_ b/application/hub/main/handler/answer-status/class_ index ae8244434..89f501dfb 100644 --- a/application/hub/main/handler/answer-status/class_ +++ b/application/hub/main/handler/answer-status/class_ @@ -47,6 +47,16 @@ class ???Handler extends BaseAnserStatusHandler implements HandleableAnswerStatu // Return the prepared instance return $handlerInstance; } + + /** + * Handles given message data array + * + * @param $messageData An array of message data + * @return void + */ + public function handleAnswerMessageData (array $messageData) { + $this->partialStub('Please implement this method.'); + } } // [EOF] -- 2.39.5