Based on the research carried out in WikiTransformation Usages, this document seeks to draw up with a PHP interface for exposing equivalent functionality to how WikiTransformation
is used. This way, we can abstract the wikitext backend used based on a configuration flag, easing our transition into using ftml instead of Text_Wiki.
See https://scuttle.atlassian.net/browse/WJ-363.
The proposed interface, in PHP psuedo-code, could look like this:
enum WikitextMode { FEED, MODULE, PAGE, FORUM_POST, DIRECT_MESSAGE, } function __construct(WikitextMode $mode); function renderHtml(string $wikitext): HtmlOutput; function renderText(string $wikitext): TextOutput;
The WikiTransformation::purifyHtml
static method will be moved to a new HTML utility class.