Page MenuHomePhabricator

ParserOutput::getExtensionData() requires knowing all the keys to retrieve the data
Closed, DeclinedPublic1 Estimated Story Points

Description

It isn't always possible to know all the keys to the ExtensionData after it's been set, for example, if there's a parser function that may be included multiple times on a page and thus stores multiple sets of data via function hooks (T121068). We could store the keys in some kind of cache, but that would defeat the entire purpose of using ExtensionData. Instead there should be a way to retrieve all the ExtensionData at once (without specifying any keys).

Event Timeline

kaldari claimed this task.
kaldari raised the priority of this task from to High.
kaldari updated the task description. (Show Details)
kaldari subscribed.

Change 258181 had a related patch set uploaded (by Kaldari):
Adding ability to retrieve all the ExtensionData at once

https://gerrit.wikimedia.org/r/258181

My inclination would be for the extension to store multiple-instance data in an array or object that's referenced through a single known key.

Change 258181 abandoned by Kaldari:
Adding ability to retrieve all the ExtensionData at once

Reason:
per brion at https://phabricator.wikimedia.org/T121124

https://gerrit.wikimedia.org/r/258181