From: Roland Häder Date: Fri, 11 Apr 2008 19:25:58 +0000 (+0000) Subject: Missing files for command pattern added X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=70be4eacb2f76926a07541d63da444c21cb2f0d6;p=shipsimu.git Missing files for command pattern added --- diff --git a/.gitattributes b/.gitattributes index f06da2f..4092791 100644 --- a/.gitattributes +++ b/.gitattributes @@ -192,7 +192,9 @@ inc/classes/exceptions/template/class_ViewHelperNotFoundException.php -text inc/classes/interfaces/.htaccess -text inc/classes/interfaces/application/.htaccess -text inc/classes/interfaces/application/class_ManageableApplication.php -text +inc/classes/interfaces/class_ -text inc/classes/interfaces/class_FrameworkInterface.php -text +inc/classes/interfaces/commands/class_Commandable.php -text inc/classes/interfaces/compressor/.htaccess -text inc/classes/interfaces/compressor/class_Compressor.php -text inc/classes/interfaces/database/.htaccess -text @@ -222,8 +224,10 @@ inc/classes/interfaces/template/.htaccess -text inc/classes/interfaces/template/class_CompileableTemplate.php -text inc/classes/interfaces/template/view/class_ViewHelper.php -text inc/classes/main/.htaccess -text +inc/classes/main/class_ -text inc/classes/main/class_BaseFrameworkSystem.php -text inc/classes/main/class_FrameworkArrayObject.php -text +inc/classes/main/commands/class_BaseCommand.php -text inc/classes/main/commands/extended/.htaccess -text inc/classes/main/commands/extended/class_ -text inc/classes/main/compressor/.htaccess -text diff --git a/inc/classes/interfaces/class_ b/inc/classes/interfaces/class_ new file mode 100644 index 0000000..906a8ad --- /dev/null +++ b/inc/classes/interfaces/class_ @@ -0,0 +1,28 @@ + + * @version 0.3.0 + * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software + * @license GNU GPL 3.0 or any newer version + * @link http://www.mxchange.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 extends FrameworkInterface { +} + +// +?> diff --git a/inc/classes/interfaces/commands/class_Commandable.php b/inc/classes/interfaces/commands/class_Commandable.php new file mode 100644 index 0000000..e8397c5 --- /dev/null +++ b/inc/classes/interfaces/commands/class_Commandable.php @@ -0,0 +1,36 @@ + + * @version 0.3.0 + * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software + * @license GNU GPL 3.0 or any newer version + * @link http://www.mxchange.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 Commandable extends FrameworkInterface { + /** + * Executes the given 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/class_ b/inc/classes/main/class_ new file mode 100644 index 0000000..c7a35e7 --- /dev/null +++ b/inc/classes/main/class_ @@ -0,0 +1,47 @@ + + * @version 0.3.0 + * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software + * @license GNU GPL 3.0 or any newer version + * @link http://www.mxchange.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 extends BaseFrameworkSystem { + /** + * Private constructor + * + * @return void + */ + private function __construct () { + // Call parent constructor + parent::constructor(__CLASS__); + + // Set part description + $this->setObjectDescription(""); + + // Create unique ID number + $this->createUniqueID(); + + // Clean up a little + $this->removeNumberFormaters(); + $this->removeSystemArray(); + } +} + +// [EOF] +?> diff --git a/inc/classes/main/commands/class_BaseCommand.php b/inc/classes/main/commands/class_BaseCommand.php new file mode 100644 index 0000000..69a3f79 --- /dev/null +++ b/inc/classes/main/commands/class_BaseCommand.php @@ -0,0 +1,47 @@ + + * @version 0.3.0 + * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software + * @license GNU GPL 3.0 or any newer version + * @link http://www.mxchange.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 BaseCommand extends BaseFrameworkSystem { + /** + * Private constructor + * + * @return void + */ + private function __construct ($class) { + // Call parent constructor + parent::constructor($class); + } + + /** + * Constructor for smooth coding style ;-) + * + * @param $class The class's real name + * @return void + */ + public function constructor ($class) { + $this->__construct($class); + } +} + +// [EOF] +?> diff --git a/inc/classes/main/commands/extended/class_ b/inc/classes/main/commands/extended/class_ index 919a549..b718936 100644 --- a/inc/classes/main/commands/extended/class_ +++ b/inc/classes/main/commands/extended/class_ @@ -19,7 +19,7 @@ * 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 . + * along with this program. If not, see . */ class Command extends BaseCommand implements Commandable { /**