diff options
| author | JoshyPHP <s9e.dev@gmail.com> | 2015-03-27 01:29:09 +0100 |
|---|---|---|
| committer | JoshyPHP <s9e.dev@gmail.com> | 2015-04-02 19:16:04 +0200 |
| commit | d8e7e11ee3a5c49e80a4ec3e0bdf2011ba5e9ce7 (patch) | |
| tree | 690612c122e04579ec9b9e95fbd121bd34c87500 /phpBB/phpbb/textformatter/s9e/parser.php | |
| parent | 3e04e643df4ca5463450df5d94f3caca3e5596c0 (diff) | |
| download | forums-d8e7e11ee3a5c49e80a4ec3e0bdf2011ba5e9ce7.tar forums-d8e7e11ee3a5c49e80a4ec3e0bdf2011ba5e9ce7.tar.gz forums-d8e7e11ee3a5c49e80a4ec3e0bdf2011ba5e9ce7.tar.bz2 forums-d8e7e11ee3a5c49e80a4ec3e0bdf2011ba5e9ce7.tar.xz forums-d8e7e11ee3a5c49e80a4ec3e0bdf2011ba5e9ce7.zip | |
[ticket/11768] Renamed service vars
The name of the variable that holds the service instance is now consistent
across events.
PHPBB3-11768
Diffstat (limited to 'phpBB/phpbb/textformatter/s9e/parser.php')
| -rw-r--r-- | phpBB/phpbb/textformatter/s9e/parser.php | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/phpBB/phpbb/textformatter/s9e/parser.php b/phpBB/phpbb/textformatter/s9e/parser.php index fb6ef03c1c..77328ee4d9 100644 --- a/phpBB/phpbb/textformatter/s9e/parser.php +++ b/phpBB/phpbb/textformatter/s9e/parser.php @@ -57,7 +57,7 @@ class parser implements \phpbb\textformatter\parser_interface $this->dispatcher = $dispatcher; $this->parser = $parser; $this->user = $user; - $self = $this; + $parser = $this; /** * Configure the parser service @@ -69,12 +69,11 @@ class parser implements \phpbb\textformatter\parser_interface * - configure the s9e\TextFormatter parser * * @event core.text_formatter_s9e_parser_setup - * @var \s9e\TextFormatter\Parser parser s9e\TextFormatter parser instance - * @var \phpbb\textformatter\s9e\parser self This parser service + * @var \phpbb\textformatter\s9e\parser parser This parser service * @var \phpbb\user user Current user * @since 3.2.0-a1 */ - $vars = array('parser', 'self', 'user'); + $vars = array('parser', 'user'); extract($dispatcher->trigger_event('core.text_formatter_s9e_parser_setup', compact($vars))); } @@ -83,17 +82,17 @@ class parser implements \phpbb\textformatter\parser_interface */ public function parse($text) { - $self = $this; + $parser = $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 \phpbb\textformatter\s9e\parser parser This parser service * @var string text The original text * @since 3.2.0-a1 */ - $vars = array('self', 'text'); + $vars = array('parser', 'text'); extract($this->dispatcher->trigger_event('core.text_formatter_s9e_parse_before', compact($vars))); $xml = $this->parser->parse($text); @@ -102,11 +101,11 @@ class parser implements \phpbb\textformatter\parser_interface * 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 \phpbb\textformatter\s9e\parser parser This parser service * @var string xml The parsed text, in XML * @since 3.2.0-a1 */ - $vars = array('self', 'xml'); + $vars = array('parser', 'xml'); extract($this->dispatcher->trigger_event('core.text_formatter_s9e_parse_after', compact($vars))); return $xml; |
