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 d0c6657..66c8147 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 6b2ca23..d7dfd9f 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 066a2a2..a4e6d86 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 73a63d9..bc7d5a5 100644 (file)
@@ -3,6 +3,7 @@
 namespace CoreFramework\Factory\Cache;
 
 // Import framework stuff
+use CoreFramework\Factory\BaseFactory;
 use CoreFramework\Factory\ObjectFactory;
 
 /**
index ce86ac7..f98fe98 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 6528ed5..3803660 100644 (file)
@@ -3,6 +3,7 @@
 namespace CoreFramework\Logging;
 
 // Import framework stuff
+use CoreFramework\Factory\BaseFactory;
 use CoreFramework\Generic\FrameworkInterface;
 
 /**
index 80cbd9b..e336c50 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 cac2836..b00c5d6 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 97de03c..7b77bdc 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