// 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);
/**
* 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");
}
}