From: Matthias Schmidt Date: Thu, 7 Apr 2016 10:09:38 +0000 (+0200) Subject: Move object list object creation to own method X-Git-Tag: 3.0.0_Beta_1~1954 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3e0c02476bd9d3101b0dc99992a4a4436ea1b9b1;p=GitHub%2FWoltLab%2FWCF.git Move object list object creation to own method --- diff --git a/wcfsetup/install/files/lib/system/cache/runtime/AbstractRuntimeCache.class.php b/wcfsetup/install/files/lib/system/cache/runtime/AbstractRuntimeCache.class.php index ea7c450ce7..ca133dc44d 100644 --- a/wcfsetup/install/files/lib/system/cache/runtime/AbstractRuntimeCache.class.php +++ b/wcfsetup/install/files/lib/system/cache/runtime/AbstractRuntimeCache.class.php @@ -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 */