aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2017-03-26 17:12:39 +0200
committerMarc Alexander <admin@m-a-styles.de>2017-03-26 17:12:39 +0200
commitecef296beeb2458f4bdccb1d3bbd05f76a580c12 (patch)
tree1820746faa53c58453057a9495b168216f1dee85
parent936426178b8dcb13233b81946d43afb5f91149d2 (diff)
parentaa888fab3404ba8544bbcc84ef96b1003979a200 (diff)
downloadforums-ecef296beeb2458f4bdccb1d3bbd05f76a580c12.tar
forums-ecef296beeb2458f4bdccb1d3bbd05f76a580c12.tar.gz
forums-ecef296beeb2458f4bdccb1d3bbd05f76a580c12.tar.bz2
forums-ecef296beeb2458f4bdccb1d3bbd05f76a580c12.tar.xz
forums-ecef296beeb2458f4bdccb1d3bbd05f76a580c12.zip
Merge pull request #4530 from senky/ticket/14557
[ticket/14557] Simplify updating overloaded events for extensions
-rw-r--r--phpBB/phpbb/event/data.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/phpBB/phpbb/event/data.php b/phpBB/phpbb/event/data.php
index c7365aee35..276ab027f2 100644
--- a/phpBB/phpbb/event/data.php
+++ b/phpBB/phpbb/event/data.php
@@ -63,4 +63,16 @@ class data extends Event implements \ArrayAccess
{
unset($this->data[$offset]);
}
+
+ /**
+ * Returns data with updated key in specified offset.
+ *
+ * @param string $subarray Data array subarray
+ * @param string $key Subarray key
+ * @param mixed $value Value to update
+ */
+ public function update_subarray($subarray, $key, $value)
+ {
+ $this->data[$subarray][$key] = $value;
+ }
}