]> git.mxchange.org Git - core.git/commitdiff
Continued:
authorRoland Haeder <roland@mxchange.org>
Sat, 25 Feb 2017 15:37:56 +0000 (16:37 +0100)
committerRoland Haeder <roland@mxchange.org>
Tue, 28 Feb 2017 21:10:04 +0000 (22:10 +0100)
- tests may later have filters but now let's not focus on it
- added "import" of BaseFactory
- added "import" of HtmlNewsFactory
- added "import" of ReadableNews
- added config entry news_reader_main_class

Signed-off-by: Roland Häder <roland@mxchange.org>
application/tests/classes/commands/console/class_TestsConsoleMainCommand.php
application/tests/classes/resolver/command/console/class_TestsConsoleCommandResolver.php
application/tests/config.php
inc/main/classes/factories/cache/class_CacheFactory.php
inc/main/classes/factories/html/class_HtmlNewsFactory.php
inc/main/classes/factories/logger/class_LoggerFactory.php
inc/main/classes/filter/news/class_NewsDownloadFilter.php
inc/main/classes/reader/class_ConsoleNewsReader.php
inc/main/classes/resolver/command/class_BaseCommandResolver.php

index d0c6657d6a495f9cf29272bd26540a811a137e64..66c8147b569d3b3c680f25963efc2bdaee33674c 100644 (file)
@@ -83,30 +83,13 @@ class TestsConsoleMainCommand extends BaseCommand implements Commandable {
         * @param       $controllerInstance             A controller instance
         * @param       $requestInstance                An instance of a class with an Requestable interface
         * @return      void
-        * @todo        Should we add some more filters?
         */
        public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
+               // @TODO Unfinished
+               return;
+
                // Add pre filters
                $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('node_php_requirements_filter'));
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('node_initializer_filter'));
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('node_welcome_teaser_filter'));
-
-               // Add bootstrap filters
-               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('node_bootstrap_generate_nodeid_filter'));
-               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('node_bootstrap_generate_sessionid_filter'));
-               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('node_bootstrap_generate_private_key_filter'));
-               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('node_bootstrap_extra_bootstrapping_filter'));
-               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('node_bootstrap_listener_pool_filter'));
-
-               // Add node activation filters
-               $controllerInstance->addActivationFilter(ObjectFactory::createObjectByConfiguredName('node_activation_task_handler_initializer_filter'));
-
-               // Add shutdown filters
-               $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('node_shutdown_flush_node_list_filter'));
-               $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('node_shutdown_task_handler_filter'));
-
-               // This is the last generic shutdown filter
-               $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('node_shutdown_node_filter'));
        }
 
 }
index 6b2ca23ec76c6ec9e9097aa6b701fa516d334b26..d7dfd9f67de86146dcefffd947d108233b06692c 100644 (file)
@@ -69,6 +69,7 @@ class TestsConsoleCommandResolver extends BaseCommandResolver implements Command
 
                // Set the application instance
                $resolverInstance->setApplicationInstance($applicationInstance);
+               $resolverInstance->setNamespace('CoreFramework\Tests\Command');
 
                // Return the prepared instance
                return $resolverInstance;
index 066a2a218aae5641bcead80c5ddc772ee793399b..a4e6d86319268bd5e19ce8cd840b11a42524db6c 100644 (file)
@@ -44,3 +44,6 @@ $cfg->setConfigEntry('news_download_filter', 'CoreFramework\Filter\News\NewsDown
 
 // CFG: NEWS-PROCESS-FILTER
 $cfg->setConfigEntry('news_process_filter', 'CoreFramework\Filter\News\NewsProcessFilter');
+
+// CFG: NEWS-READER-MAIN-CLASS
+$cfg->setConfigEntry('news_reader_main_class', 'CoreFramework\Reader\News\Console\ConsoleNewsReader');
index 73a63d9739f2e444b453f7e8c96c22fee4ecbdbc..bc7d5a5dd2d27c8c6be0f14a46bd2b8188af8032 100644 (file)
@@ -3,6 +3,7 @@
 namespace CoreFramework\Factory\Cache;
 
 // Import framework stuff
+use CoreFramework\Factory\BaseFactory;
 use CoreFramework\Factory\ObjectFactory;
 
 /**
index ce86ac756af835af3042eab9c9b6a3ee6825ec32..f98fe98dcb13a95448d203e0f765d721bd587534 100644 (file)
@@ -3,6 +3,7 @@
 namespace CoreFramework\Factory\News;
 
 // Import framework stuff
+use CoreFramework\Factory\BaseFactory;
 use CoreFramework\Factory\ObjectFactory;
 use CoreFramework\Request\Requestable;
 
index 6528ed54f384739babeba35afca18a50541e25f1..38036608325d58946c1e07a6455be03fae86feee 100644 (file)
@@ -3,6 +3,7 @@
 namespace CoreFramework\Logging;
 
 // Import framework stuff
+use CoreFramework\Factory\BaseFactory;
 use CoreFramework\Generic\FrameworkInterface;
 
 /**
index 80cbd9b2a78b4862684084d07440e6eb6056c405..e336c507b936dc934cd62299bcc667c461730603 100644 (file)
@@ -3,6 +3,7 @@
 namespace CoreFramework\Filter\News;
 
 // Import framework stuff
+use CoreFramework\Factory\News\HtmlNewsFactory;
 use CoreFramework\Filter\BaseFilter;
 use CoreFramework\Filter\Filterable;
 use CoreFramework\Registry\Registry;
index cac2836006c5c558a44ad3d29ebe3c4629dbfd6b..b00c5d62caf64815fc708fa5d42f18d44833e523 100644 (file)
@@ -1,10 +1,11 @@
 <?php
 // Own namespace
-namespace CoreFramework\Reader\News;
+namespace CoreFramework\Reader\News\Console;
 
 // Import framework stuff
 use CoreFramework\Factory\ObjectFactory;
 use CoreFramework\Object\BaseFrameworkSystem;
+use CoreFramework\Reader\News\ReadableNews;
 use CoreFramework\Registry\Registerable;
 use CoreFramework\Request\Requestable;
 
index 97de03c0b0700d8b7e330b4df79acbf8ef2f34ea..7b77bdce213f53b12349fcc938f070b1a9e79c70 100644 (file)
@@ -105,7 +105,7 @@ class BaseCommandResolver extends BaseResolver {
                } // END - if
 
                // Check if command is valid
-               if ($this->isCommandValid($commandName) === FALSE) {
+               if ($this->isCommandValid($this->getNamespace(), $commandName) === FALSE) {
                        // This command is invalid!
                        throw new InvalidCommandException(array($this, $commandName), self::EXCEPTION_INVALID_COMMAND);
                } // END - if