]> git.mxchange.org Git - shipsimu.git/blobdiff - inc/classes/main/reader/class_DefaultNewsReader.php
A lot rewrites and fixes for weak redirect methods
[shipsimu.git] / inc / classes / main / reader / class_DefaultNewsReader.php
index d6b8fc9b08d4f031304ceb0f067a31a7784a200a..b0dbac671522f27e7c59cfcd5acb18fae4aeda2c 100644 (file)
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 class DefaultNewsReader extends BaseFrameworkSystem implements ReadableNews, Registerable {
-       /**
-        * Result set with news
-        */
-       private $resultInstance = null;
-
        /**
         * Protected constructor
         *
@@ -36,12 +31,6 @@ class DefaultNewsReader extends BaseFrameworkSystem implements ReadableNews, Reg
                // Call parent constructor
                parent::__construct(__CLASS__);
 
-               // Set part description
-               $this->setObjectDescription("Default news reader");
-
-               // Create unique ID number
-               $this->generateUniqueId();
-
                // Clean up a little
                $this->removeNumberFormaters();
                $this->removeSystemArray();
@@ -81,7 +70,7 @@ class DefaultNewsReader extends BaseFrameworkSystem implements ReadableNews, Reg
                $criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
 
                // Add the page as criteria to it at lease
-               $criteriaInstance->addCriteria('page', $page);
+               $criteriaInstance->addCriteria("page", $page);
 
                // Add limitation from config
                $criteriaInstance->setLimit($this->getConfigInstance()->readConfig("news_{$page}_limit"));
@@ -90,7 +79,7 @@ class DefaultNewsReader extends BaseFrameworkSystem implements ReadableNews, Reg
                $resultInstance = $wrapperInstance->doSelectByCriteria($criteriaInstance);
 
                // Save that resultInstance in this class
-               $this->resultInstance = $resultInstance;
+               $this->setResultInstance($resultInstance);
        }
 }