class Formatter implements ExtenderInterface, LifecycleInterface
Methods
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.
Prepare the system for parsing. This can be used to modify the text that will be parsed, or to modify the parser.
Prepare the system for rendering. This can be used to modify the xml that will be rendered, or to modify the renderer.
Details
at
line 33
configure(callable|string $callback)
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.
at
line 54
parse(callable|string $callback)
Prepare the system for parsing. This can be used to modify the text that will be parsed, or to modify the parser.
Please note that the text to be parsed must be returned, regardless of whether it's changed.
at
line 76
render(callable|string $callback)
Prepare the system for rendering. This can be used to modify the xml that will be rendered, or to modify the renderer.
Please note that the xml to be rendered must be returned, regardless of whether it's changed.