aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorJoshyPHP <s9e.dev@gmail.com>2015-02-15 03:08:36 +0100
committerJoshyPHP <s9e.dev@gmail.com>2015-04-02 19:16:01 +0200
commit6bd86a8e8a7c8e2ccf90d02343132c085978cd44 (patch)
tree630068c062790c451143b418acccc4ea7f6446b9 /phpBB
parentf6e3e41717e71fb43ea63785cfe7980e33be3fbf (diff)
downloadforums-6bd86a8e8a7c8e2ccf90d02343132c085978cd44.tar
forums-6bd86a8e8a7c8e2ccf90d02343132c085978cd44.tar.gz
forums-6bd86a8e8a7c8e2ccf90d02343132c085978cd44.tar.bz2
forums-6bd86a8e8a7c8e2ccf90d02343132c085978cd44.tar.xz
forums-6bd86a8e8a7c8e2ccf90d02343132c085978cd44.zip
[ticket/11768] Updated phpbb\textformatter\s9e\factory::regenerate()
Returns an associative array rather than a numerically-indexed array. Feels cleaner and more extensible. PHPBB3-11768
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/phpbb/textformatter/s9e/factory.php4
-rw-r--r--phpBB/phpbb/textformatter/s9e/parser.php2
-rw-r--r--phpBB/phpbb/textformatter/s9e/renderer.php2
3 files changed, 4 insertions, 4 deletions
diff --git a/phpBB/phpbb/textformatter/s9e/factory.php b/phpBB/phpbb/textformatter/s9e/factory.php
index 77b1a1c916..ed99bba4a1 100644
--- a/phpBB/phpbb/textformatter/s9e/factory.php
+++ b/phpBB/phpbb/textformatter/s9e/factory.php
@@ -294,7 +294,7 @@ class factory implements \phpbb\textformatter\cache
/**
* Regenerate and cache a new parser and renderer
*
- * @return array Array with two elements: an instance of the parser, an instance of the renderer
+ * @return array Associative array with at least two elements: "parser" and "renderer"
*/
public function regenerate()
{
@@ -315,7 +315,7 @@ class factory implements \phpbb\textformatter\cache
);
$this->cache->put($this->cache_key_renderer, $renderer_data);
- return array($parser, $renderer);
+ return array('parser' => $parser, 'renderer' => $renderer);
}
/**
diff --git a/phpBB/phpbb/textformatter/s9e/parser.php b/phpBB/phpbb/textformatter/s9e/parser.php
index 3b490131f2..8e78a18d40 100644
--- a/phpBB/phpbb/textformatter/s9e/parser.php
+++ b/phpBB/phpbb/textformatter/s9e/parser.php
@@ -48,7 +48,7 @@ class parser extends \phpbb\textformatter\parser
$parser = $cache->get($key);
if (!$parser)
{
- list($parser) = $factory->regenerate();
+ extract($factory->regenerate());
}
$this->parser = $parser;
diff --git a/phpBB/phpbb/textformatter/s9e/renderer.php b/phpBB/phpbb/textformatter/s9e/renderer.php
index eea01f82af..943056e6ca 100644
--- a/phpBB/phpbb/textformatter/s9e/renderer.php
+++ b/phpBB/phpbb/textformatter/s9e/renderer.php
@@ -80,7 +80,7 @@ class renderer extends \phpbb\textformatter\renderer
if (!isset($renderer))
{
- list(, $renderer) = $factory->regenerate();
+ extract($factory->regenerate());
}
$this->renderer = $renderer;