]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/factories/web/class_WebNewsFactory.php
Updated copyright:
[core.git] / inc / classes / main / factories / web / class_WebNewsFactory.php
index 10386e232f47f14ab480f48e66949ee7e972e90b..ba042b41c55ac4ad239f4edace76ee0dd9410204 100644 (file)
@@ -2,11 +2,11 @@
 /**
  * A news factory for web pages
  *
- * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.ship-simu.org
+ * @link               http://www.shipsimu.org
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ class WebNewsFactory extends BaseFactory {
        /**
         * Instance of a request class
         */
-       private $requestInstance = null;
+       private $requestInstance = NULL;
 
        /**
         * Protected constructor
@@ -44,9 +44,9 @@ class WebNewsFactory extends BaseFactory {
         * @param       $requestInstance        An instance of a request class
         * @return      $factoryInstance        An instance of a WebNewsFactory class
         */
-       public final static function createFactoryByRequest (Requestable $requestInstance) {
+       public static final function createFactoryByRequest (Requestable $requestInstance) {
                // Set default news reader class
-               $configEntry = "news_reader_class";
+               $configEntry = 'news_reader_class';
 
                // Get "page"
                $page = $requestInstance->getRequestElement('page');
@@ -67,7 +67,7 @@ class WebNewsFactory extends BaseFactory {
                } // END - if
 
                // Get the news reader class name from config
-               $className = $requestInstance->getConfigInstance()->readConfig($configEntry);
+               $className = $requestInstance->getConfigInstance()->getConfigEntry($configEntry);
 
                // Once we have that name, try to load initialize it
                $newsInstance = ObjectFactory::createObjectByName($className, array($requestInstance));