]> git.mxchange.org Git - shipsimu.git/blobdiff - inc/classes/main/controller/default/class_WebDefaultNewsController.php
Fix for moved code
[shipsimu.git] / inc / classes / main / controller / default / class_WebDefaultNewsController.php
index ff86531c71e8a5e59670dd1d9c022f38961b16e3..b9f1ee8fed25e41989fdc9994151a45d2dbfa925 100644 (file)
@@ -84,11 +84,8 @@ class WebDefaultNewsController extends BaseController implements Controller {
                // Get the command instance from the resolver by sending a request instance to the resolver
                $commandInstance = $this->resolverInstance->resolvCommandByRequest($requestInstance);
 
-               // Get the news page variable from the request instance
-               $newsPage = $requestInstance->getRequestElement("news_page");
-
                // Load the news here
-               $this->loadNews($newsPage);
+               $this->loadNews($requestInstance);
 
                // Execute the command
                $commandInstance->execute($requestInstance, $responseInstance);
@@ -100,10 +97,12 @@ class WebDefaultNewsController extends BaseController implements Controller {
        /**
         * Loads news from the connected database for later usage
         *
-        * @param       $newsPage       Page of listed news we want to read
+        * @param       $requestInstance        An instance of a request class
         * @return      void
         */
-       private function loadNews ($newsPage) {
+       private function loadNews (Requestable $requestInstance) {
+               // Get the news page variable from the request instance
+               $newsPage = $requestInstance->getRequestElement("news_page");
        }
 }