Missing files for command pattern added
authorRoland Häder <roland@mxchange.org>
Fri, 11 Apr 2008 19:25:58 +0000 (19:25 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 11 Apr 2008 19:25:58 +0000 (19:25 +0000)
.gitattributes
inc/classes/interfaces/class_ [new file with mode: 0644]
inc/classes/interfaces/commands/class_Commandable.php [new file with mode: 0644]
inc/classes/main/class_ [new file with mode: 0644]
inc/classes/main/commands/class_BaseCommand.php [new file with mode: 0644]
inc/classes/main/commands/extended/class_

index f06da2f604f1f781a674397b4c560b29a4df7b7a..409279134c48f6aec0ab4177d74cf524f14391e4 100644 (file)
@@ -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 (file)
index 0000000..906a8ad
--- /dev/null
@@ -0,0 +1,28 @@
+<?php
+/**
+ * 
+ *
+ * @author             Roland Haeder <webmaster@mxchange.org>
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+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 (file)
index 0000000..e8397c5
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+/**
+ * An interface for commands for the front controller
+ *
+ * @author             Roland Haeder <webmaster@mxchange.org>
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+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 (file)
index 0000000..c7a35e7
--- /dev/null
@@ -0,0 +1,47 @@
+<?php
+/**
+ * 
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+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 (file)
index 0000000..69a3f79
--- /dev/null
@@ -0,0 +1,47 @@
+<?php
+/**
+ * A general (base) command
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+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]
+?>
index 919a5492ac38b7193de1938bc6042cbbfc6a1dcc..b71893678e5f75a453a1aa5c14d67992c6815ee3 100644 (file)
@@ -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 <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 class Command extends BaseCommand implements Commandable {
        /**