Move object list object creation to own method
authorMatthias Schmidt <gravatronics@live.com>
Thu, 7 Apr 2016 10:09:38 +0000 (12:09 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Thu, 7 Apr 2016 10:09:38 +0000 (12:09 +0200)
wcfsetup/install/files/lib/system/cache/runtime/AbstractRuntimeCache.class.php

index ea7c450ce7394da35389ec9aba12ff1b54d82128..ca133dc44de300d1c2c175ba898f7ccc18aa6ae0 100644 (file)
@@ -56,8 +56,7 @@ abstract class AbstractRuntimeCache extends SingletonFactory implements IRuntime
         * Fetches the objects for the pending object ids.
         */
        protected function fetchObjects() {
-               /** @var DatabaseObjectList $objectList */
-               $objectList = new $this->listClassName;
+               $objectList = $this->getObjectList();
                $objectList->setObjectIDs(array_values($this->objectIDs));
                $objectList->readObjects();
                $this->objects += $objectList->getObjects();
@@ -94,6 +93,15 @@ abstract class AbstractRuntimeCache extends SingletonFactory implements IRuntime
                return $this->objects[$objectID];
        }
        
+       /**
+        * Returns a database object list object to fetch cached objects.
+        * 
+        * @return      DatabaseObjectList
+        */
+       protected function getObjectList() {
+               return new $this->listClassName;
+       }
+       
        /**
         * @inheritDoc
         */