From: Roland Häder Date: Sat, 18 Jul 2009 08:05:45 +0000 (+0000) Subject: Opps, needs to rename the class X-Git-Url: https://git.mxchange.org/?p=core.git;a=commitdiff_plain;h=b060611909838ff17215706692b238f45cfee295;ds=sidebyside Opps, needs to rename the class --- diff --git a/inc/classes/main/reader/class_ConsoleNewsReader.php b/inc/classes/main/reader/class_ConsoleNewsReader.php index 0240b74d..e954686a 100644 --- a/inc/classes/main/reader/class_ConsoleNewsReader.php +++ b/inc/classes/main/reader/class_ConsoleNewsReader.php @@ -1,6 +1,6 @@ * @version 0.0.0 @@ -21,7 +21,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class DefaultNewsReader extends BaseFrameworkSystem implements ReadableNews, Registerable { +class ConsoleNewsReader extends BaseFrameworkSystem implements ReadableNews, Registerable { /** * Protected constructor * @@ -42,9 +42,9 @@ class DefaultNewsReader extends BaseFrameworkSystem implements ReadableNews, Reg * @param $requestInstance An instance of a Requestable class * @return $readerInstance An instance of this reader class */ - public final static function createDefaultNewsReader (Requestable $requestInstance) { + public final static function createConsoleNewsReader (Requestable $requestInstance) { // Get a new instance - $readerInstance = new DefaultNewsReader(); + $readerInstance = new ConsoleNewsReader(); // Set request instance $readerInstance->setRequestInstance($requestInstance); @@ -54,14 +54,14 @@ class DefaultNewsReader extends BaseFrameworkSystem implements ReadableNews, Reg } /** - * Initializes this reader class by pre-fetching news depending on 'page' + * Initializes this reader class by pre-fetching news depending on 'command' * (outside or login area), which amount of news and how much to skip * * @return void */ public function initializeReader () { - // Get 'page' for saving some calls - $page = $this->getRequestInstance()->getRequestElement('page'); + // Get 'command' for saving some calls + $command = $this->getRequestInstance()->getRequestElement('command'); // First get a wrapper instance $wrapperInstance = ObjectFactory::createObjectByConfiguredName('news_db_wrapper_class'); @@ -69,11 +69,11 @@ class DefaultNewsReader extends BaseFrameworkSystem implements ReadableNews, Reg // Next create a searchable criteria instance $criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class'); - // Add the page as criteria to it at lease - $criteriaInstance->addCriteria('page', $page); + // Add the command as criteria to it at lease + $criteriaInstance->addCriteria('page', $command); // Add limitation from config - $criteriaInstance->setLimit($this->getConfigInstance()->readConfig('news_' . $page . '_limit')); + $criteriaInstance->setLimit($this->getConfigInstance()->readConfig('news_' . $command . '_limit')); // Get a resultInstance back from the database $resultInstance = $wrapperInstance->doSelectByCriteria($criteriaInstance);