From 390641f83ec749cc41a77bb80357105c200abb43 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 20 Jun 2008 18:14:59 +0000 Subject: [PATCH] Interface for actions added (PerformableAction) --- .gitattributes | 2 ++ .../actions/class_ShipSimuLoginAction.php | 2 +- .../actions/class_ShipSimuLogoutAction.php | 2 +- .../actions/class_ShipSimuProfileAction.php | 2 +- inc/classes/interfaces/actions/.htaccess | 1 + .../actions/class_PerformableAction.php | 36 +++++++++++++++++++ .../class_LoginAfterRegistrationAction.php | 2 +- 7 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 inc/classes/interfaces/actions/.htaccess create mode 100644 inc/classes/interfaces/actions/class_PerformableAction.php diff --git a/.gitattributes b/.gitattributes index be0e286..360ab57 100644 --- a/.gitattributes +++ b/.gitattributes @@ -255,6 +255,8 @@ inc/classes/exceptions/user/class_UserEmailMissingException.php -text inc/classes/exceptions/user/class_UserPasswordMismatchException.php -text inc/classes/exceptions/user/class_UsernameMissingException.php -text inc/classes/interfaces/.htaccess -text +inc/classes/interfaces/actions/.htaccess -text +inc/classes/interfaces/actions/class_PerformableAction.php -text inc/classes/interfaces/application/.htaccess -text inc/classes/interfaces/application/class_ManageableApplication.php -text inc/classes/interfaces/auth/.htaccess -text diff --git a/application/ship-simu/main/actions/class_ShipSimuLoginAction.php b/application/ship-simu/main/actions/class_ShipSimuLoginAction.php index baf56a0..1611415 100644 --- a/application/ship-simu/main/actions/class_ShipSimuLoginAction.php +++ b/application/ship-simu/main/actions/class_ShipSimuLoginAction.php @@ -21,7 +21,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class ShipSimuLoginAction extends BaseAction implements Commandable { +class ShipSimuLoginAction extends BaseAction implements PerformableAction { /** * Protected constructor * diff --git a/application/ship-simu/main/actions/class_ShipSimuLogoutAction.php b/application/ship-simu/main/actions/class_ShipSimuLogoutAction.php index e1c0014..7239333 100644 --- a/application/ship-simu/main/actions/class_ShipSimuLogoutAction.php +++ b/application/ship-simu/main/actions/class_ShipSimuLogoutAction.php @@ -21,7 +21,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class ShipSimuLogoutAction extends BaseAction implements Commandable { +class ShipSimuLogoutAction extends BaseAction implements PerformableAction { /** * Protected constructor * diff --git a/application/ship-simu/main/actions/class_ShipSimuProfileAction.php b/application/ship-simu/main/actions/class_ShipSimuProfileAction.php index ce27819..7377ac4 100644 --- a/application/ship-simu/main/actions/class_ShipSimuProfileAction.php +++ b/application/ship-simu/main/actions/class_ShipSimuProfileAction.php @@ -21,7 +21,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class ShipSimuProfileAction extends BaseAction implements Commandable { +class ShipSimuProfileAction extends BaseAction implements PerformableAction { /** * Protected constructor * diff --git a/inc/classes/interfaces/actions/.htaccess b/inc/classes/interfaces/actions/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/inc/classes/interfaces/actions/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/inc/classes/interfaces/actions/class_PerformableAction.php b/inc/classes/interfaces/actions/class_PerformableAction.php new file mode 100644 index 0000000..485aa9e --- /dev/null +++ b/inc/classes/interfaces/actions/class_PerformableAction.php @@ -0,0 +1,36 @@ + + * @version 0.0.0 + * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software + * @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 PerformableAction extends FrameworkInterface { + /** + * Executes the command with given request and response objects + * + * @param $requestInstance An instance of a class with an Requestable interface + * @param $responseInstance An instance of a class with an Responseable interface + * @return void + */ + function execute (Requestable $requestInstance, Responseable $responseInstance); +} + +// +?> diff --git a/inc/classes/main/actions/post_registration/class_LoginAfterRegistrationAction.php b/inc/classes/main/actions/post_registration/class_LoginAfterRegistrationAction.php index c5f1e8a..8500474 100644 --- a/inc/classes/main/actions/post_registration/class_LoginAfterRegistrationAction.php +++ b/inc/classes/main/actions/post_registration/class_LoginAfterRegistrationAction.php @@ -21,7 +21,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class LoginAfterRegistrationAction extends BaseAction implements Commandable { +class LoginAfterRegistrationAction extends BaseAction implements PerformableAction { /** * Protected constructor * -- 2.39.5