]> git.mxchange.org Git - shipsimu.git/blobdiff - inc/classes/main/controller/default/class_WebDefaultNewsController.php
getConfigInstance() is now protected, factories added
[shipsimu.git] / inc / classes / main / controller / default / class_WebDefaultNewsController.php
index b9f1ee8fed25e41989fdc9994151a45d2dbfa925..835f94b88ea3393fd94aafdf5149c8924b9519cc 100644 (file)
@@ -85,7 +85,7 @@ class WebDefaultNewsController extends BaseController implements Controller {
                $commandInstance = $this->resolverInstance->resolvCommandByRequest($requestInstance);
 
                // Load the news here
-               $this->loadNews($requestInstance);
+               $this->loadNewsByRequest($requestInstance);
 
                // Execute the command
                $commandInstance->execute($requestInstance, $responseInstance);
@@ -95,14 +95,14 @@ class WebDefaultNewsController extends BaseController implements Controller {
        }
 
        /**
-        * Loads news from the connected database for later usage
+        * Loads news by a given request
         *
         * @param       $requestInstance        An instance of a request class
         * @return      void
         */
-       private function loadNews (Requestable $requestInstance) {
-               // Get the news page variable from the request instance
-               $newsPage = $requestInstance->getRequestElement("news_page");
+       private function loadNewsByRequest (Requestable $requestInstance) {
+               // Generate a new news object but not carring about which concrete we have
+               $newsInstance = NewsFactory::createFactoryByRequest($requestInstance)->createNewsObject();
        }
 }