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/query/.htaccess -text
+application/hub/interfaces/query/class_Queryable.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/query/.htaccess -text
+application/hub/main/connectors/query/class_ -text
+application/hub/main/connectors/query/class_BaseQueryConnector.php -text
+application/hub/main/connectors/query/local/.htaccess -text
+application/hub/main/connectors/query/local/class_LocalQueryConnector.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
// CFG: WEB-CONTENT-TYPE
$cfg->setConfigEntry('web_content_type', "");
+// CFG: QUERY-CONNECTOR
+$cfg->setConfigEntry('query_connector_class', "LocalQueryConnector");
+
// CFG: QUEUE-CONNECTOR
-$cfg->setConfigEntry('queue_connector', "LocalQueueConnector");
+$cfg->setConfigEntry('queue_connector_class', "LocalQueueConnector");
// [EOF]
?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * An interface for querys
+ *
+ * @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 Queryable extends FrameworkInterface {
+}
+
+//
+?>
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
class BaseConnector extends BaseFrameworkSystem {
+ /**
+ * An instance of a node
+ */
+ private $nodeInstance = null;
+
/**
* Protected constructor
*
$this->removeNumberFormaters();
$this->removeSystemArray();
}
+
+ /**
+ * Setter for node instance
+ *
+ * @param $nodeInstance An instance of a node node
+ * @return void
+ */
+ protected final function setNodeInstance (NodeHelper $nodeInstance) {
+ $this->nodeInstance = $nodeInstance;
+ }
+
+ /**
+ * Getter for node instance
+ *
+ * @return $nodeInstance An instance of a node node
+ */
+ public final function getNodeInstance () {
+ return $this->nodeInstance;
+ }
}
// [EOF]
--- /dev/null
+Deny from all
--- /dev/null
+<?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
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * 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]
+?>
--- /dev/null
+<?php
+/**
+ * A general query 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 BaseQueryConnector extends BaseConnector {
+ /**
+ * Protected constructor
+ *
+ * @param $className Name of the class
+ * @return void
+ */
+ protected function __construct ($className) {
+ // Call parent constructor
+ parent::__construct($className);
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A local query 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 LocalQueryConnector extends BaseQueryConnector implements Connectable, Queryable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this query connector class
+ *
+ * @param $nodeInstance An instance of a node
+ * @return $connectorInstance An instance of this query connector class
+ */
+ public final static function createLocalQueryConnector (NodeHelper $nodeInstance) {
+ // Create the instance
+ $connectorInstance = new LocalQueryConnector();
+
+ // Set the node instance
+ $connectorInstance->setNodeInstance($nodeInstance);
+
+ // Finally return it
+ return $connectorInstance;
+ }
+}
+
+// [EOF]
+?>
/**
* Protected constructor
*
- * @param $className Name of the class
* @return void
*/
- protected function __construct ($className) {
+ protected function __construct () {
// Call parent constructor
- parent::__construct($className);
+ parent::__construct(__CLASS__);
}
/**
* @param $className Name of the class
* @return void
*/
- protected function __construct ($className) {
+ protected function __construct () {
// Call parent constructor
- parent::__construct($className);
+ parent::__construct(__CLASS__);
}
/**
* Creates an instance of this queue connector class
*
+ * @param $nodeInstance An instance of a hub node
* @return $connectorInstance An instance of this queue connector class
*/
- public final static function createLocalQueueConnector () {
+ public final static function createLocalQueueConnector (NodeHelper $nodeInstance) {
// Create the instance
$connectorInstance = new LocalQueueConnector();
+ // Set the node instance
+ $connectorInstance->setNodeInstance($nodeInstance);
+
// Finally return it
return $connectorInstance;
}
// This might not be all...
$this->partialStub('Please implement more bootsrapping steps.');
-
- // This should be the last thing to do: output teaser lines
- $this->outputConsoleTeaser();
}
/**
*/
private $bootIpPort = '';
+ /**
+ * Query connector instance
+ */
+ private $queryInstance = null;
+
/**
* Protected constructor
*
* @todo This method is maybe not yet finished.
*/
protected function doGenericBootstrapping () {
- // @TODO Empty method
+ // This should be the last line: output teaser
+ $this->outputConsoleTeaser();
+
+ // @TODO Add some generic bootstrap steps
$this->partialStub('Add some generic bootstrap steps here.');
}
* @return void
*/
protected function initGenericQueues () {
- $this->partialStub('Init query queue here.');
+ // Set it
+ $this->queryInstance = ObjectFactory::createObjectByConfiguredName('query_connector_class', array($this));
}
/**
*/
public function updateDatabaseField ($fieldName, $fieldValue) {
// Unfinished
- $this->partialStub("Unfinished!");
+ $this->partialStub('Unfinished!');
return;
// Get a critieria instance
// Call generic (parent) bootstrapping method first
parent::doGenericBootstrapping();
$this->partialStub('Please implement this method.');
-
- // This should be the last line: output teaser
- $this->outputConsoleTeaser();
}
/**
// Call generic (parent) bootstrapping method first
parent::doGenericBootstrapping();
$this->partialStub('Please implement this method.');
-
- // This should be the last line: output teaser
- $this->outputConsoleTeaser();
}
/**
// Call generic (parent) bootstrapping method first
parent::doGenericBootstrapping();
$this->partialStub('Please implement this method.');
-
- // This is the last line: output teaser
- $this->outputConsoleTeaser();
}
/**