X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=application%2Ftests%2Fclasses%2Fcontroller%2Fconsole%2Fclass_TestsConsoleDefaultNewsController.php;h=d86ebf356296a114b5246f14fb0d4ba906958517;hb=8b7563e0de442492f93be4c24efdb902474fa86c;hp=2f6e415387e9e5073e4b67aaecd3fcb3270c2616;hpb=015c9d406c90225160488fcaaebe4575ce5cf61a;p=core.git diff --git a/application/tests/classes/controller/console/class_TestsConsoleDefaultNewsController.php b/application/tests/classes/controller/console/class_TestsConsoleDefaultNewsController.php index 2f6e4153..d86ebf35 100644 --- a/application/tests/classes/controller/console/class_TestsConsoleDefaultNewsController.php +++ b/application/tests/classes/controller/console/class_TestsConsoleDefaultNewsController.php @@ -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] -?> +}