class Formatter implements ExtenderInterface, LifecycleInterface
Methods
<p>Configure the formatter. This can be used to add support for custom markdown/bbcode/etc tags, or otherwise change the formatter. Please see documentation for the s9e text formatter library for more information on how to use this.</p>
<p>Prepare the system for parsing. This can be used to modify the text that will be parsed, or to modify the parser.</p>
<p>Prepare the system for unparsing. This can be used to modify the text that was parsed.</p>
<p>Prepare the system for rendering. This can be used to modify the xml that will be rendered, or to modify the renderer.</p>
Details
at
line 38
Formatter
configure(callable|string $callback)
<p>Configure the formatter. This can be used to add support for custom markdown/bbcode/etc tags, or otherwise change the formatter. Please see documentation for the s9e text formatter library for more information on how to use this.</p>
at
line 61
Formatter
parse(callable|string $callback)
<p>Prepare the system for parsing. This can be used to modify the text that will be parsed, or to modify the parser.</p>
<p>Please note that the text to be parsed must be returned, regardless of whether it's changed.</p>
at
line 83
Formatter
unparse(callable|string $callback)
<p>Prepare the system for unparsing. This can be used to modify the text that was parsed.</p>
<p>Please note that the parsed text must be returned, regardless of whether it's changed.</p>