]> git.mxchange.org Git - hub.git/commitdiff
Some filter classes renamed
authorRoland Häder <roland@mxchange.org>
Fri, 7 Aug 2009 18:36:02 +0000 (18:36 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 7 Aug 2009 18:36:02 +0000 (18:36 +0000)
.gitattributes
application/hub/config.php
application/hub/main/commands/console/class_HubConsoleMainCommand.php
application/hub/main/filter/bootstrap/class_HubBootstrapAquireHubIdFilter.php [deleted file]
application/hub/main/filter/bootstrap/class_HubBootstrapGenSessionIdFilter.php [deleted file]
application/hub/main/filter/bootstrap/class_HubBootstrapGenerateHubIdFilter.php [new file with mode: 0644]
application/hub/main/filter/bootstrap/class_HubBootstrapGenerateSessionIdFilter.php [new file with mode: 0644]

index fecd077c53a25148ab14988d811b38a82182c4ff..2f5dca9da2a8c0223c8121e7a490c1d8fcb43328 100644 (file)
@@ -74,9 +74,9 @@ application/hub/main/filter/activation/.htaccess -text
 application/hub/main/filter/activation/class_HubActivation -text
 application/hub/main/filter/bootstrap/.htaccess -text
 application/hub/main/filter/bootstrap/class_HubBootstrap -text
-application/hub/main/filter/bootstrap/class_HubBootstrapAquireHubIdFilter.php -text
 application/hub/main/filter/bootstrap/class_HubBootstrapExtraBootstrappingFilter.php -text
-application/hub/main/filter/bootstrap/class_HubBootstrapGenSessionIdFilter.php -text
+application/hub/main/filter/bootstrap/class_HubBootstrapGenerateHubIdFilter.php -text
+application/hub/main/filter/bootstrap/class_HubBootstrapGenerateSessionIdFilter.php -text
 application/hub/main/filter/bootstrap/class_HubBootstrapInitQueuesFilter.php -text
 application/hub/main/filter/bootstrap/class_HubBootstrapListenerPoolFilter.php -text
 application/hub/main/filter/bootstrap/class_HubBootstrapRestoreNodeListFilter.php -text
index e824a269574c264bd09fdf9f6701ce700f0a5904..78e4fe8ede4fdc334029ce63b3669bde8796f562 100644 (file)
@@ -117,11 +117,11 @@ $cfg->setConfigEntry('node_initializer_filter', 'NodeInitializationFilter');
 // CFG: CONSOLE-WELCOME-TEASER-FILTER
 $cfg->setConfigEntry('console_welcome_teaser_filter', 'ConsoleWelcomeTeaserFilter');
 
-// CFG: HUB-BOOTSTRAP-AQUIRE-HUBID-FILTER
-$cfg->setConfigEntry('hub_bootstrap_aquire_hubid_filter', 'HubBootstrapAquireHubIdFilter');
+// CFG: HUB-BOOTSTRAP-GENERATE-HUBID-FILTER
+$cfg->setConfigEntry('hub_bootstrap_generate_hubid_filter', 'HubBootstrapGenerateHubIdFilter');
 
-// CFG: HUB-BOOTSTRAP-GEN-SESSIONID-FILTER
-$cfg->setConfigEntry('hub_bootstrap_gen_sessionid_filter', 'HubBootstrapGenSessionIdFilter');
+// CFG: HUB-BOOTSTRAP-GENERATE-SESSIONID-FILTER
+$cfg->setConfigEntry('hub_bootstrap_generate_sessionid_filter', 'HubBootstrapGenerateSessionIdFilter');
 
 // CFG: HUB-BOOTSTRAP-RESTORE-NODELIST-FILTER
 $cfg->setConfigEntry('hub_bootstrap_restore_nodelist_filter', 'HubBootstrapRestoreNodeListFilter');
index 3030c48b6aea59c0e8babc7d592f41313d464eca..576c7b4c7cce646dc9e2f0c7b7ee39215f72c409 100644 (file)
@@ -112,12 +112,12 @@ class HubConsoleMainCommand extends BaseCommand implements Commandable {
         */
        public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
                // Add pre filters
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('node_initializer_filter'));
                $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('console_welcome_teaser_filter'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('node_initializer_filter'));
 
                // Add bootstrap filters
-               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('hub_bootstrap_aquire_hubid_filter'));
-               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('hub_bootstrap_gen_sessionid_filter'));
+               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('hub_bootstrap_generate_hubid_filter'));
+               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('hub_bootstrap_generate_sessionid_filter'));
                $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('hub_bootstrap_restore_nodelist_filter'));
                $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('hub_bootstrap_init_queues_filter'));
                $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('hub_bootstrap_extra_bootstrap_filter'));
diff --git a/application/hub/main/filter/bootstrap/class_HubBootstrapAquireHubIdFilter.php b/application/hub/main/filter/bootstrap/class_HubBootstrapAquireHubIdFilter.php
deleted file mode 100644 (file)
index 8046882..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-<?php
-/**
- * A ??? filter for bootstrapping
- *
- * @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 HubBootstrapAquireHubIdFilter extends BaseFilter implements Filterable {
-       /**
-        * Protected constructor
-        *
-        * @return      void
-        */
-       protected function __construct () {
-               // Call parent constructor
-               parent::__construct(__CLASS__);
-       }
-
-       /**
-        * Creates an instance of this filter class
-        *
-        * @return      $filterInstance         An instance of this filter class
-        */
-       public final static function createHubBootstrapAquireHubIdFilter () {
-               // Get a new instance
-               $filterInstance = new HubBootstrapAquireHubIdFilter();
-
-               // Return the instance
-               return $filterInstance;
-       }
-
-       /**
-        * Executes the filter 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
-        * @throws      FilterChainException    If $nodeInstance is null (no NullPointerException here)
-        */
-       public function execute (Requestable $requestInstance, Responseable $responseInstance) {
-               // Get node instance
-               $nodeInstance = Registry::getRegistry()->getInstance('node');
-
-               // Sanity-check on it
-               if (is_null($nodeInstance)) {
-                       // Throws a FilterChainException to stop further processing
-                       throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
-               } // END - if
-
-               // --------------------- Hub-id acquirement phase ---------------------
-               // Acquire a hub-id. This step generates on first launch a new one and
-               // on any later launches it will restore the hub-id from the database.
-               // A passed 'nickname=xxx' argument will be used to add some
-               // 'personality' to the hub.
-               $nodeInstance->bootstrapAcquireHubId();
-       }
-}
-
-// [EOF]
-?>
diff --git a/application/hub/main/filter/bootstrap/class_HubBootstrapGenSessionIdFilter.php b/application/hub/main/filter/bootstrap/class_HubBootstrapGenSessionIdFilter.php
deleted file mode 100644 (file)
index 62a8040..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-/**
- * A GenSessionId filter for bootstrapping
- *
- * @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 HubBootstrapGenSessionIdFilter extends BaseFilter implements Filterable {
-       /**
-        * Protected constructor
-        *
-        * @return      void
-        */
-       protected function __construct () {
-               // Call parent constructor
-               parent::__construct(__CLASS__);
-       }
-
-       /**
-        * Creates an instance of this filter class
-        *
-        * @return      $filterInstance         An instance of this filter class
-        */
-       public final static function createHubBootstrapGenSessionIdFilter () {
-               // Get a new instance
-               $filterInstance = new HubBootstrapGenSessionIdFilter();
-
-               // Return the instance
-               return $filterInstance;
-       }
-
-       /**
-        * Executes the filter 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
-        * @throws      FilterChainException    If $nodeInstance is null (no NullPointerException here)
-        */
-       public function execute (Requestable $requestInstance, Responseable $responseInstance) {
-               // Get node instance
-               $nodeInstance = Registry::getRegistry()->getInstance('node');
-
-               // Sanity-check on it
-               if (is_null($nodeInstance)) {
-                       // Throws a FilterChainException to stop further processing
-                       throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
-               } // END - if
-
-               // ------------------- More generic bootstrap steps -------------------
-               // Generate the session id which will only be stored in RAM and kept for
-               // the whole "session".
-               $nodeInstance->bootstrapGenerateSessionId();
-       }
-}
-
-// [EOF]
-?>
diff --git a/application/hub/main/filter/bootstrap/class_HubBootstrapGenerateHubIdFilter.php b/application/hub/main/filter/bootstrap/class_HubBootstrapGenerateHubIdFilter.php
new file mode 100644 (file)
index 0000000..e00ca12
--- /dev/null
@@ -0,0 +1,76 @@
+<?php
+/**
+ * A GenerateHubId filter for bootstrapping
+ *
+ * @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 HubBootstrapGenerateHubIdFilter extends BaseFilter implements Filterable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of this filter class
+        *
+        * @return      $filterInstance         An instance of this filter class
+        */
+       public final static function createHubBootstrapGenerateHubIdFilter () {
+               // Get a new instance
+               $filterInstance = new HubBootstrapGenerateHubIdFilter();
+
+               // Return the instance
+               return $filterInstance;
+       }
+
+       /**
+        * Executes the filter 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
+        * @throws      FilterChainException    If $nodeInstance is null (no NullPointerException here)
+        */
+       public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+               // Get node instance
+               $nodeInstance = Registry::getRegistry()->getInstance('node');
+
+               // Sanity-check on it
+               if (is_null($nodeInstance)) {
+                       // Throws a FilterChainException to stop further processing
+                       throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
+               } // END - if
+
+               // --------------------- Hub-id acquirement phase ---------------------
+               // Acquire a hub-id. This step generates on first launch a new one and
+               // on any later launches it will restore the hub-id from the database.
+               // A passed 'nickname=xxx' argument will be used to add some
+               // 'personality' to the hub.
+               $nodeInstance->bootstrapAcquireHubId();
+       }
+}
+
+// [EOF]
+?>
diff --git a/application/hub/main/filter/bootstrap/class_HubBootstrapGenerateSessionIdFilter.php b/application/hub/main/filter/bootstrap/class_HubBootstrapGenerateSessionIdFilter.php
new file mode 100644 (file)
index 0000000..1dcaf87
--- /dev/null
@@ -0,0 +1,74 @@
+<?php
+/**
+ * A GenerateSessionId filter for bootstrapping
+ *
+ * @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 HubBootstrapGenerateSessionIdFilter extends BaseFilter implements Filterable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of this filter class
+        *
+        * @return      $filterInstance         An instance of this filter class
+        */
+       public final static function createHubBootstrapGenerateSessionIdFilter () {
+               // Get a new instance
+               $filterInstance = new HubBootstrapGenerateSessionIdFilter();
+
+               // Return the instance
+               return $filterInstance;
+       }
+
+       /**
+        * Executes the filter 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
+        * @throws      FilterChainException    If $nodeInstance is null (no NullPointerException here)
+        */
+       public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+               // Get node instance
+               $nodeInstance = Registry::getRegistry()->getInstance('node');
+
+               // Sanity-check on it
+               if (is_null($nodeInstance)) {
+                       // Throws a FilterChainException to stop further processing
+                       throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
+               } // END - if
+
+               // ------------------- More generic bootstrap steps -------------------
+               // Generate the session id which will only be stored in RAM and kept for
+               // the whole "session".
+               $nodeInstance->bootstrapGenerateSessionId();
+       }
+}
+
+// [EOF]
+?>