There are a large number of ad-hoc booleans in ParserOutput:
- ::setNoGallery()
- ::setEnableOOUI()
- ::setIndexPolicy() (maybe?)
- ::setNewSection()
- ::setHideNewSection()
- ::setPreventClickjacking()
These generally have nothing to do with the parser, they are just pass-throughs from certain extensions or parser functions. We should try to unify them to a standard interface so that the API of ParserOutput doesn't grow w/o limit. Perhaps
function setOutputFlag(string $flag, bool $val = true);
can be used, with a class
class ParserOutputFlags { public const PREVENT_CLICKJACKING = 'mw-preventClickjacking'; public const ENABLE_OOUI = 'mw-enableOOUI'; // etc }
In fact, we already have ParserOutput::setExtensionData() *and* ::setFlag(); perhaps this should be used for the backend storage instead of inventing a new method.