WikiTransformation Usages
Wikidot drives its parser and renderer through the Wikidot\Utils\WikiTransformation
class, which has a large number of fields and methods, making it difficult to determine exactly what the contract of the class is intended to be.
Here we will document all the present usages of WikiTransformation
to see what expectations and usecases it has, to be able to design the interface of WikitextBackend
.
FeedModule.php
, FrontForumModule.php
:
$wt = new WikiTransformation();
$wt->setMode("feed");
$template = $wt->processSource($format);
ForumPreviewPostModule.php
, ForumAction.php
:
$wt = new WikiTransformation();
$wt->setMode('post');
$body = $wt->processSource($source);
ForumPostRevisionModule.php
:
$source = $revision->getText();
$wt = new WikiTransformation();
$body = $wt->processSource($source);
PMAction.php
, PMPreviewModule.php
:
PMDraftsMessageModule.php
:
PagePreviewModule.php
:
PageVersionModule.php
:
Outdater.php
:
ListPagesModule.php
:
SocialBookmarksModule.php
:
PagesFeed.php
:
WDEditUtils.php
:
Overall, I would group this in a few categories:
Generating RSS feeds
Compiling forum posts
Compiling private messages
Compiling page text
Includes the
Outdater
, which has a bit of notable logic around page invalidation.
Handling
_template
pagesListPages
Miscellaneous
Social bookmarks, only for “purifying”
WDEditUtils
, which does page sectioning