]> git.mxchange.org Git - hub.git/commitdiff
Classes and interfaces for queue connectors (a la wrapper) added
authorRoland Häder <roland@mxchange.org>
Sun, 5 Jul 2009 21:24:12 +0000 (21:24 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 5 Jul 2009 21:24:12 +0000 (21:24 +0000)
13 files changed:
.gitattributes
application/hub/config.php
application/hub/interfaces/connectors/.htaccess [new file with mode: 0644]
application/hub/interfaces/connectors/class_Connectable.php [new file with mode: 0644]
application/hub/interfaces/queues/.htaccess [new file with mode: 0644]
application/hub/interfaces/queues/class_Queueable.php [new file with mode: 0644]
application/hub/main/connectors/.htaccess [new file with mode: 0644]
application/hub/main/connectors/class_BaseConnector.php [new file with mode: 0644]
application/hub/main/connectors/queues/.htaccess [new file with mode: 0644]
application/hub/main/connectors/queues/class_ [new file with mode: 0644]
application/hub/main/connectors/queues/class_BaseQueueConnector.php [new file with mode: 0644]
application/hub/main/connectors/queues/local/.htaccess [new file with mode: 0644]
application/hub/main/connectors/queues/local/class_LocalQueueConnector.php [new file with mode: 0644]

index 8d83ab097e8078123ac8331d78ef93dd61b3df61..468e6ab4171c428fbeac87095deb2901f68f2f99 100644 (file)
@@ -10,10 +10,21 @@ application/hub/exceptions.php -text
 application/hub/exceptions/.htaccess -text
 application/hub/init.php -text
 application/hub/interfaces/.htaccess -text
+application/hub/interfaces/connectors/.htaccess -text
+application/hub/interfaces/connectors/class_Connectable.php -text
 application/hub/interfaces/nodes/.htaccess -text
 application/hub/interfaces/nodes/class_NodeHelper.php -text
+application/hub/interfaces/queues/.htaccess -text
+application/hub/interfaces/queues/class_Queueable.php -text
 application/hub/loader.php -text
 application/hub/main/.htaccess -text
+application/hub/main/connectors/.htaccess -text
+application/hub/main/connectors/class_BaseConnector.php -text
+application/hub/main/connectors/queues/.htaccess -text
+application/hub/main/connectors/queues/class_ -text
+application/hub/main/connectors/queues/class_BaseQueueConnector.php -text
+application/hub/main/connectors/queues/local/.htaccess -text
+application/hub/main/connectors/queues/local/class_LocalQueueConnector.php -text
 application/hub/main/database/.htaccess -text
 application/hub/main/database/wrapper/.htaccess -text
 application/hub/main/database/wrapper/class_NodeInformationDatabaseWrapper.php -text
index 558b8ac239f3385ff7f012d9a63a2ed936369dc2..c52c6dbe74219ed59b76c7dd529f4f2dd1830065 100644 (file)
@@ -48,5 +48,8 @@ $cfg->setConfigEntry('node_info_db_wrapper_class', "NodeInformationDatabaseWrapp
 // CFG: WEB-CONTENT-TYPE
 $cfg->setConfigEntry('web_content_type', "");
 
+// CFG: QUEUE-CONNECTOR
+$cfg->setConfigEntry('queue_connector', "LocalQueueConnector");
+
 // [EOF]
 ?>
diff --git a/application/hub/interfaces/connectors/.htaccess b/application/hub/interfaces/connectors/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/hub/interfaces/connectors/class_Connectable.php b/application/hub/interfaces/connectors/class_Connectable.php
new file mode 100644 (file)
index 0000000..37ee9c1
--- /dev/null
@@ -0,0 +1,28 @@
+<?php
+/**
+ * An interface for connector classes
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Core 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/>.
+ */
+interface Connectable extends FrameworkInterface {
+}
+
+//
+?>
diff --git a/application/hub/interfaces/queues/.htaccess b/application/hub/interfaces/queues/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/hub/interfaces/queues/class_Queueable.php b/application/hub/interfaces/queues/class_Queueable.php
new file mode 100644 (file)
index 0000000..0d52619
--- /dev/null
@@ -0,0 +1,28 @@
+<?php
+/**
+ * An interface for queues
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Core 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/>.
+ */
+interface Queueable extends FrameworkInterface {
+}
+
+//
+?>
diff --git a/application/hub/main/connectors/.htaccess b/application/hub/main/connectors/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/hub/main/connectors/class_BaseConnector.php b/application/hub/main/connectors/class_BaseConnector.php
new file mode 100644 (file)
index 0000000..592a6ba
--- /dev/null
@@ -0,0 +1,42 @@
+<?php
+/**
+ * A general connector class
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Core 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 BaseConnector extends BaseFrameworkSystem {
+       /**
+        * Protected constructor
+        *
+        * @param       $className      Name of the class
+        * @return      void
+        */
+       protected function __construct ($className) {
+               // Call parent constructor
+               parent::__construct($className);
+
+               // Clean up a little
+               $this->removeNumberFormaters();
+               $this->removeSystemArray();
+       }
+}
+
+// [EOF]
+?>
diff --git a/application/hub/main/connectors/queues/.htaccess b/application/hub/main/connectors/queues/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/hub/main/connectors/queues/class_ b/application/hub/main/connectors/queues/class_
new file mode 100644 (file)
index 0000000..c9d1d52
--- /dev/null
@@ -0,0 +1,51 @@
+<?php
+/**
+ * A ??? queue connector class
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Core 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 ???QueueConnector extends BaseQueueConnector implements Connectable, Queueable {
+       /**
+        * Protected constructor
+        *
+        * @param       $className      Name of the class
+        * @return      void
+        */
+       protected function __construct ($className) {
+               // Call parent constructor
+               parent::__construct($className);
+       }
+
+       /**
+        * Creates an instance of this queue connector class
+        *
+        * @return      $connectorInstance      An instance of this queue connector class
+        */
+       public final static function create???QueueConnector () {
+               // Create the instance
+               $connectorInstance = new ???QueueConnector();
+
+               // Finally return it
+               return $connectorInstance;
+       }
+}
+
+// [EOF]
+?>
diff --git a/application/hub/main/connectors/queues/class_BaseQueueConnector.php b/application/hub/main/connectors/queues/class_BaseQueueConnector.php
new file mode 100644 (file)
index 0000000..31d34b8
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+/**
+ * A general queue connector class
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Core 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 BaseQueueConnector extends BaseConnector {
+       /**
+        * Protected constructor
+        *
+        * @param       $className      Name of the class
+        * @return      void
+        */
+       protected function __construct ($className) {
+               // Call parent constructor
+               parent::__construct($className);
+       }
+}
+
+// [EOF]
+?>
diff --git a/application/hub/main/connectors/queues/local/.htaccess b/application/hub/main/connectors/queues/local/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/hub/main/connectors/queues/local/class_LocalQueueConnector.php b/application/hub/main/connectors/queues/local/class_LocalQueueConnector.php
new file mode 100644 (file)
index 0000000..29f3007
--- /dev/null
@@ -0,0 +1,51 @@
+<?php
+/**
+ * A local queue connector class
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Core 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 LocalQueueConnector extends BaseQueueConnector implements Connectable, Queueable {
+       /**
+        * Protected constructor
+        *
+        * @param       $className      Name of the class
+        * @return      void
+        */
+       protected function __construct ($className) {
+               // Call parent constructor
+               parent::__construct($className);
+       }
+
+       /**
+        * Creates an instance of this queue connector class
+        *
+        * @return      $connectorInstance      An instance of this queue connector class
+        */
+       public final static function createLocalQueueConnector () {
+               // Create the instance
+               $connectorInstance = new LocalQueueConnector();
+
+               // Finally return it
+               return $connectorInstance;
+       }
+}
+
+// [EOF]
+?>