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 10 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:

This is intended less as a formal proposal than a scratch location for writing out thoughts as I look at usages of WikiTransformation.

enum WikitextMode {
    FEED,
    LIST,
    PAGE,
    FORUM_POST,
    DIRECT_MESSAGE,
    TABLE_OF_CONTENTS,
}

function __construct(WikitextMode $mode, PageInfo $pageInfo);

function renderHtml(string $wikitext): HtmlOutput;
function renderText(string $wikitext): TextOutput;

The WikiTransformation::purifyHtml static method will be moved to a new HTML utility class.

We will need to output backlinks and include numbers up to the main page compilation in Outdater.

Look to WikiTransformation->setMode() to see what mode handling expects.

  • No labels