Page MenuHomePhabricator

[Task] Allow central datatype registry to also manage callbacks per value type.
Closed, ResolvedPublic

Description

In many places, like when creating formatters, we fall back to handling based on the value type if no specific handling is defined for a data type. Factory callbacks for value types are currently hard coded. To ensure consistency with the registered data types, improve locality of the factory code, and allow new value types to be registered dynamically, factory callbacks for value types should be defined the same way as data types, namely in $wgWBRepoDataTypes and $wgWBClientDataTypes.

The two global arrays should be changed to use the convention already implemented in some places that allow handlers per datatype as well as fallbacks to value types: data types use the "PT:" prefix, value types use the "VT" prefix.

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.