$commandInstance = $this->resolverInstance->resolvCommandByRequest($requestInstance);
// Load the news here
- $this->loadNews($requestInstance);
+ $this->loadNewsByRequest($requestInstance);
// Execute the command
$commandInstance->execute($requestInstance, $responseInstance);
}
/**
- * 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();
}
}