From 3e0c02476bd9d3101b0dc99992a4a4436ea1b9b1 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Thu, 7 Apr 2016 12:09:38 +0200 Subject: [PATCH] Move object list object creation to own method --- .../cache/runtime/AbstractRuntimeCache.class.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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 */ -- 2.20.1