]> git.mxchange.org Git - hub.git/commitdiff
Filters/commands added, missing config entries added
authorRoland Häder <roland@mxchange.org>
Sun, 19 Jul 2009 15:58:26 +0000 (15:58 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 19 Jul 2009 15:58:26 +0000 (15:58 +0000)
13 files changed:
.gitattributes
application/hub/class_ApplicationHelper.php
application/hub/config.php
application/hub/main/commands/.htaccess [new file with mode: 0644]
application/hub/main/commands/console/.htaccess [new file with mode: 0644]
application/hub/main/commands/console/class_ConsoleMainCommand.php [new file with mode: 0644]
application/hub/main/filter/.htaccess [new file with mode: 0644]
application/hub/main/filter/bootstrap/.htaccess [new file with mode: 0644]
application/hub/main/filter/bootstrap/class_Bootstrap [new file with mode: 0644]
application/hub/main/filter/console/.htaccess [new file with mode: 0644]
application/hub/main/filter/console/class_Console [new file with mode: 0644]
application/hub/main/filter/console/class_ConsoleWelcomeTeaserFilter.php [new file with mode: 0644]
db/news/.htaccess [new file with mode: 0644]

index 024efc0db350f73ade87b8b44f9a18268e6ba577..7c7f796bfc71c8ca1c29ceffd52c1fe6bd2fefeb 100644 (file)
@@ -36,6 +36,9 @@ application/hub/main/.htaccess -text
 application/hub/main/class_ -text
 application/hub/main/class_Base -text
 application/hub/main/class_BaseHubSystem.php -text
+application/hub/main/commands/.htaccess -text
+application/hub/main/commands/console/.htaccess -text
+application/hub/main/commands/console/class_ConsoleMainCommand.php -text
 application/hub/main/connectors/.htaccess -text
 application/hub/main/connectors/class_BaseConnector.php -text
 application/hub/main/connectors/query/.htaccess -text
@@ -51,6 +54,12 @@ 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
+application/hub/main/filter/.htaccess -text
+application/hub/main/filter/bootstrap/.htaccess -text
+application/hub/main/filter/bootstrap/class_Bootstrap -text
+application/hub/main/filter/console/.htaccess -text
+application/hub/main/filter/console/class_Console -text
+application/hub/main/filter/console/class_ConsoleWelcomeTeaserFilter.php -text
 application/hub/main/listener/.htaccess -text
 application/hub/main/listener/class_ -text
 application/hub/main/listener/class_BaseListener.php -text
@@ -100,6 +109,7 @@ application/hub/main/states/hub/class_BaseHubState.php -text
 application/hub/starter.php -text
 /clear-cache.sh -text
 db/.htaccess -text
+db/news/.htaccess -text
 db/node_data/.htaccess -text
 docs/COPYING -text
 docs/COPYING.documents -text
index bc1f8c954fb7d3643fb42e6fa01e1f9479eb05f4..96d955ace9315cd7489548917999b0968d215dce 100644 (file)
@@ -182,7 +182,11 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
 
                // If it is null then get default command
                if (is_null($commandName)) {
+                       // Get default command
                        $commandName = $responseInstance->getDefaultCommand();
+
+                       // Set it in request
+                       $requestInstance->setRequestElement('command', $commandName);
                } // END - if
 
                // Get a resolver
index da92087ded5d074a6179051c6a080d04c5e0e052..f8e54313dbc5cb4184828a3eaed383367a9922cb 100644 (file)
@@ -87,5 +87,20 @@ $cfg->setConfigEntry('default_console_command', "main");
 // CFG: CONSOLE-CMD-RESOLVER-CLASS
 $cfg->setConfigEntry('console_cmd_resolver_class', "ConsoleCommandResolver");
 
+// CFG: NEWS-DOWNLOAD-FILTER
+$cfg->setConfigEntry('news_download_filter', "NewsDownloadFilter");
+
+// CFG: NEWS-PROCESS-FILTER
+$cfg->setConfigEntry('news_process_filter', "NewsProcessFilter");
+
+// CFG: CONSOLE-WELCOME-TEASER-FILTER
+$cfg->setConfigEntry('console_welcome_teaser_filter', "ConsoleWelcomeTeaserFilter");
+
+// CFG: NEWS-READER-CLASS
+$cfg->setConfigEntry('news_reader_class', "ConsoleNewsReader");
+
+// CFG: NEWS-MAIN-LIMIT
+$cfg->setConfigEntry('news_main_limit', 5);
+
 // [EOF]
 ?>
diff --git a/application/hub/main/commands/.htaccess b/application/hub/main/commands/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/hub/main/commands/console/.htaccess b/application/hub/main/commands/console/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/hub/main/commands/console/class_ConsoleMainCommand.php b/application/hub/main/commands/console/class_ConsoleMainCommand.php
new file mode 100644 (file)
index 0000000..4ce11a5
--- /dev/null
@@ -0,0 +1,78 @@
+<?php
+/**
+ * A command for 'main'
+ *
+ * @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 ConsoleMainCommand extends BaseCommand implements Commandable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of this class
+        *
+        * @param       $resolverInstance       An instance of a command resolver class
+        * @return      $commandInstance        An instance a prepared command class
+        */
+       public final static function createConsoleMainCommand (CommandResolver $resolverInstance) {
+               // Get new instance
+               $commandInstance = new ConsoleMainCommand();
+
+               // Set the application instance
+               $commandInstance->setResolverInstance($resolverInstance);
+
+               // Return the prepared instance
+               return $commandInstance;
+       }
+
+       /**
+        * 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
+        * @todo        0% done
+        */
+       public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+               $this->partialStub('Unfinished method.');
+       }
+
+       /**
+        * Adds extra filters to the given controller instance
+        *
+        * @param       $controllerInstance             A controller instance
+        * @param       $requestInstance                An instance of a class with an Requestable interface
+        * @return      void
+        */
+       public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
+               // Add filters
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('console_welcome_teaser_filter'));
+       }
+}
+
+// [EOF]
+?>
diff --git a/application/hub/main/filter/.htaccess b/application/hub/main/filter/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/hub/main/filter/bootstrap/.htaccess b/application/hub/main/filter/bootstrap/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/hub/main/filter/bootstrap/class_Bootstrap b/application/hub/main/filter/bootstrap/class_Bootstrap
new file mode 100644 (file)
index 0000000..9e509f6
--- /dev/null
@@ -0,0 +1,63 @@
+<?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 ???BootstrapFilter 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 create???BootstrapFilter () {
+               // Get a new instance
+               $filterInstance = new ???BootstrapFilter();
+
+               // 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
+        * @todo        0% done
+        */
+       public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+               // Implement this!
+               $this->partialStub("Please implement this method.");
+       }
+}
+
+// [EOF]
+?>
diff --git a/application/hub/main/filter/console/.htaccess b/application/hub/main/filter/console/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/hub/main/filter/console/class_Console b/application/hub/main/filter/console/class_Console
new file mode 100644 (file)
index 0000000..d6565af
--- /dev/null
@@ -0,0 +1,63 @@
+<?php
+/**
+ * A ??? filter for the console
+ *
+ * @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 Console???Filter 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 createConsole???Filter () {
+               // Get a new instance
+               $filterInstance = new Console???Filter();
+
+               // 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
+        * @todo        0% done
+        */
+       public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+               // Implement this!
+               $this->partialStub("Please implement this method.");
+       }
+}
+
+// [EOF]
+?>
diff --git a/application/hub/main/filter/console/class_ConsoleWelcomeTeaserFilter.php b/application/hub/main/filter/console/class_ConsoleWelcomeTeaserFilter.php
new file mode 100644 (file)
index 0000000..1f889d0
--- /dev/null
@@ -0,0 +1,63 @@
+<?php
+/**
+ * A welcome-teaser filter for the console
+ *
+ * @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 ConsoleWelcomeTeaserFilter 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 createConsoleWelcomeTeaserFilter () {
+               // Get a new instance
+               $filterInstance = new ConsoleWelcomeTeaserFilter();
+
+               // 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
+        * @todo        0% done
+        */
+       public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+               // Implement this!
+               $this->partialStub("Please implement this method.");
+       }
+}
+
+// [EOF]
+?>
diff --git a/db/news/.htaccess b/db/news/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all