Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

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.

  • No labels