]> 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 2f6e415387e9e5073e4b67aaecd3fcb3270c2616..d86ebf356296a114b5246f14fb0d4ba906958517 100644 (file)
@@ -4,6 +4,12 @@ namespace CoreFramework\Tests\Controller;
 
 // Import framework stuff
 use CoreFramework\Controller\BaseController;
+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;
 
 /**
  * The default controller with news for e.g. home or news page
@@ -38,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
-               */
        }
 
        /**
@@ -59,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;
@@ -89,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
@@ -107,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]
-?>
+}