* 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();
return $this->objects[$objectID];
}
+ /**
+ * Returns a database object list object to fetch cached objects.
+ *
+ * @return DatabaseObjectList
+ */
+ protected function getObjectList() {
+ return new $this->listClassName;
+ }
+
/**
* @inheritDoc
*/