aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/textformatter
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb/textformatter')
-rw-r--r--phpBB/phpbb/textformatter/s9e/parser.php28
-rw-r--r--phpBB/phpbb/textformatter/s9e/renderer.php2
2 files changed, 28 insertions, 2 deletions
diff --git a/phpBB/phpbb/textformatter/s9e/parser.php b/phpBB/phpbb/textformatter/s9e/parser.php
index 37900d3d7c..f220dd3e64 100644
--- a/phpBB/phpbb/textformatter/s9e/parser.php
+++ b/phpBB/phpbb/textformatter/s9e/parser.php
@@ -83,7 +83,33 @@ class parser implements \phpbb\textformatter\parser_interface
*/
public function parse($text)
{
- return $this->parser->parse($text);
+ $self = $this;
+
+ /**
+ * Modify a text before it is parsed
+ *
+ * @event core.text_formatter_s9e_parse_before
+ * @var \phpbb\textformatter\s9e\parser self This parser service
+ * @var string text The original text
+ * @since 3.2.0-a1
+ */
+ $vars = array('self', 'text');
+ extract($this->dispatcher->trigger_event('core.text_formatter_s9e_parse_before', compact($vars)));
+
+ $xml = $this->parser->parse($text);
+
+ /**
+ * Modify a parsed text in its XML form
+ *
+ * @event core.text_formatter_s9e_parse_after
+ * @var \phpbb\textformatter\s9e\parser self This parser service
+ * @var string xml The parsed text, in XML
+ * @since 3.2.0-a1
+ */
+ $vars = array('self', 'xml');
+ extract($this->dispatcher->trigger_event('core.text_formatter_s9e_parse_after', compact($vars)));
+
+ return $xml;
}
/**
diff --git a/phpBB/phpbb/textformatter/s9e/renderer.php b/phpBB/phpbb/textformatter/s9e/renderer.php
index 484b067d47..272cc5e6f3 100644
--- a/phpBB/phpbb/textformatter/s9e/renderer.php
+++ b/phpBB/phpbb/textformatter/s9e/renderer.php
@@ -256,7 +256,7 @@ class renderer implements \phpbb\textformatter\renderer_interface
* Modify a rendered text
*
* @event core.text_formatter_s9e_render_after
- * @var string html The renderer text's HTML
+ * @var string html The rendered text's HTML
* @var \phpbb\textformatter\s9e\renderer self This renderer service
* @since 3.2.0-a1
*/