Introduced executeGenericPrePostCommand() which will execute a command with
[core.git] / inc / classes / main / controller / console / class_ConsoleDefaultNewsController.php
index f0c029739f0ca06d4d845d4e2578f6f340a40219..89ecb683cdd4c92232e398da801a8bd5c3e05bf4 100644 (file)
@@ -61,26 +61,8 @@ class ConsoleDefaultNewsController extends BaseController implements Controller
         * @return      void
         */
        public function handleRequest (Requestable $requestInstance, Responseable $responseInstance) {
-               // Get the command instance from the resolver by sending a request instance to the resolver
-               $commandInstance = $this->getResolverInstance()->resolveCommandByRequest($requestInstance);
-
-               // Add more filters by the command
-               $commandInstance->addExtraFilters($this, $requestInstance);
-
-               // Run the pre filters
-               $this->executePreFilters($requestInstance, $responseInstance);
-
-               // This request was valid! :-D
-               $requestInstance->requestIsValid();
-
-               // Execute the command
-               $commandInstance->execute($requestInstance, $responseInstance);
-
-               // Run the pre filters
-               $this->executePostFilters($requestInstance, $responseInstance);
-
-               // Flush the response out
-               $responseInstance->flushBuffer();
+               // Generic pre-post command execution
+               $this->executeGenericPrePostCommand($requestInstance, $responseInstance);
        }
 }