]> git.mxchange.org Git - hub.git/commitdiff
Added a filter for checking if all requirements in PHP did meet
authorRoland Häder <roland@mxchange.org>
Sat, 21 Nov 2009 19:45:13 +0000 (19:45 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 21 Nov 2009 19:45:13 +0000 (19:45 +0000)
.gitattributes
application/hub/config.php
application/hub/main/commands/console/class_HubConsoleMainCommand.php
application/hub/main/filter/node/class_Node
application/hub/main/filter/node/class_NodePhpRequirementsFilter.php [new file with mode: 0644]

index 6657d302baf91dd73c134e0c8adf355465db5fa3..9f20200125059953c25f3b693e9f8a73a23b3f42 100644 (file)
@@ -118,6 +118,7 @@ application/hub/main/filter/console/class_ConsoleWelcomeTeaserFilter.php -text
 application/hub/main/filter/node/.htaccess -text
 application/hub/main/filter/node/class_Node -text
 application/hub/main/filter/node/class_NodeInitializationFilter.php -text
+application/hub/main/filter/node/class_NodePhpRequirementsFilter.php -text
 application/hub/main/filter/shutdown/.htaccess -text
 application/hub/main/filter/shutdown/class_HubShutdown -text
 application/hub/main/filter/shutdown/class_HubShutdownDeinitQueuesFilter.php -text
index 95eceb9cfb78705bb238717655e3b67f6bf7fb44..00fe3d0134e39be6edc1908a1b503b6a50b9fff1 100644 (file)
@@ -129,6 +129,9 @@ $cfg->setConfigEntry('news_download_filter', 'NewsDownloadFilter');
 // CFG: NEWS-PROCESS-FILTER
 $cfg->setConfigEntry('news_process_filter', 'NewsProcessFilter');
 
+// CFG: NODE-PHP-REQUIREMENTS-FILTER
+$cfg->setConfigEntry('node_php_requirements_filter', 'NodePhpRequirementsFilter');
+
 // CFG: NODE-INITIALIZER-FILTER
 $cfg->setConfigEntry('node_initializer_filter', 'NodeInitializationFilter');
 
index 4f087269f40b712845683ba9ec5b7b2dc871b2e1..424717577e9eb2506806e02ef969940b61ca22d9 100644 (file)
@@ -108,6 +108,7 @@ class HubConsoleMainCommand extends BaseCommand implements Commandable {
         */
        public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
                // Add pre filters
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('node_php_requirements_filter'));
                $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('node_initializer_filter'));
                $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('console_welcome_teaser_filter'));
 
index 9495b56af0716625c900a76ede3ba3b9d513c6b4..969e7cad9a3840ec1e7871df4ff573442b97956e 100644 (file)
@@ -55,7 +55,7 @@ class Node???Filter extends BaseFilter implements Filterable {
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
                // Implement this!
-               $this->partialStub("Please implement this method.");
+               $this->partialStub('Please implement this method.');
        }
 }
 
diff --git a/application/hub/main/filter/node/class_NodePhpRequirementsFilter.php b/application/hub/main/filter/node/class_NodePhpRequirementsFilter.php
new file mode 100644 (file)
index 0000000..2012ca5
--- /dev/null
@@ -0,0 +1,63 @@
+<?php
+/**
+ * A PhpRequirements filter for nodes
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Hub 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 NodePhpRequirementsFilter 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 createNodePhpRequirementsFilter () {
+               // Get a new instance
+               $filterInstance = new NodePhpRequirementsFilter();
+
+               // 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]
+?>