]> git.mxchange.org Git - core.git/blobdiff - application/tests/classes/controller/console/class_TestsConsoleDefaultNewsController.php
Continued:
[core.git] / application / tests / classes / controller / console / class_TestsConsoleDefaultNewsController.php
index 266ee5424e0248dd9f2e8400b40b0decbd4c27c6..d86ebf356296a114b5246f14fb0d4ba906958517 100644 (file)
@@ -4,8 +4,11 @@ namespace CoreFramework\Tests\Controller;
 
 // Import framework stuff
 use CoreFramework\Controller\BaseController;
-use CoreFramework\Controller\Generic\Controller;
+use CoreFramework\Controller\Controller;
+use CoreFramework\Factory\ObjectFactory;
+use CoreFramework\Filter\Filterable;
 use CoreFramework\Request\Requestable;
+use CoreFramework\Resolver\Command\CommandResolver;
 use CoreFramework\Response\Responseable;
 
 /**
@@ -41,11 +44,9 @@ class TestsConsoleDefaultNewsController extends BaseController implements Contro
                parent::__construct(__CLASS__);
 
                // Init additional filter chains
-               /*
-               foreach (array('bootstrap', 'activation','shutdown') as $filterChain) {
+               foreach (array('bootstrap', 'tests', 'shutdown') as $filterChain) {
                        $this->initFilterChain($filterChain);
                } // END - foreach
-               */
        }
 
        /**
@@ -62,8 +63,8 @@ class TestsConsoleDefaultNewsController extends BaseController implements Contro
                $controllerInstance->setResolverInstance($resolverInstance);
 
                // Add news filters to this controller
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_download_filter'));
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_process_filter'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_download_filter_class'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_process_filter_class'));
 
                // Return the prepared instance
                return $controllerInstance;
@@ -92,7 +93,7 @@ class TestsConsoleDefaultNewsController extends BaseController implements Contro
                // Execute the command
                $commandInstance->execute($requestInstance, $responseInstance);
 
-               // Run the pre filters
+               // Run the post filters
                $this->executePostFilters($requestInstance, $responseInstance);
 
                // Flush the response out
@@ -110,37 +111,35 @@ class TestsConsoleDefaultNewsController extends BaseController implements Contro
        }
 
        /**
-        * Executes all bootstrap filters
+        * Add a tests filter
         *
-        * @param       $requestInstance        A Requestable class
-        * @param       $responseInstance       A Responseable class
+        * @param       $filterInstance         A Filterable class
         * @return      void
         */
-       public function executeBootstrapFilters (Requestable $requestInstance, Responseable $responseInstance) {
-               $this->executeFilters('bootstrap', $requestInstance, $responseInstance);
+       public function addTestsFilter (Filterable $filterInstance) {
+               $this->addFilter('tests', $filterInstance);
        }
 
        /**
-        * Add a hub activation filter
+        * Executes all bootstrap filters
         *
-        * @param       $filterInstance         A Filterable class
+        * @param       $requestInstance        A Requestable class
+        * @param       $responseInstance       A Responseable class
         * @return      void
         */
-       public function addActivationFilter (Filterable $filterInstance) {
-               $this->addFilter('activation', $filterInstance);
+       public function executeBootstrapFilters (Requestable $requestInstance, Responseable $responseInstance) {
+               $this->executeFilters('bootstrap', $requestInstance, $responseInstance);
        }
 
        /**
-        * Executes all hub activation filters
+        * Executes all tests filters
         *
         * @param       $requestInstance        A Requestable class
         * @param       $responseInstance       A Responseable class
         * @return      void
         */
-       public function executeActivationFilters (Requestable $requestInstance, Responseable $responseInstance) {
-               $this->executeFilters('activation', $requestInstance, $responseInstance);
+       public function executeTestsFilters (Requestable $requestInstance, Responseable $responseInstance) {
+               $this->executeFilters('tests', $requestInstance, $responseInstance);
        }
-}
 
-// [EOF]
-?>
+}