aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/event
diff options
context:
space:
mode:
authorJakub Senko <jakubsenko@gmail.com>2016-11-20 19:06:23 +0100
committerJakub Senko <jakubsenko@gmail.com>2016-12-26 14:05:06 +0100
commit60251cd62367aa8b50e7f717479eea5170b03e98 (patch)
treeb1e95c8359d8e6a3cf4d03a087f9e8cffa265266 /phpBB/phpbb/event
parent453d9113f1f955dc5e948f62dc73dcef81283732 (diff)
downloadforums-60251cd62367aa8b50e7f717479eea5170b03e98.tar
forums-60251cd62367aa8b50e7f717479eea5170b03e98.tar.gz
forums-60251cd62367aa8b50e7f717479eea5170b03e98.tar.bz2
forums-60251cd62367aa8b50e7f717479eea5170b03e98.tar.xz
forums-60251cd62367aa8b50e7f717479eea5170b03e98.zip
[ticket/14557] Simplify updating overloaded events for extensions
PHPBB3-14557
Diffstat (limited to 'phpBB/phpbb/event')
-rw-r--r--phpBB/phpbb/event/data.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/phpBB/phpbb/event/data.php b/phpBB/phpbb/event/data.php
index c7365aee35..42080e96d5 100644
--- a/phpBB/phpbb/event/data.php
+++ b/phpBB/phpbb/event/data.php
@@ -63,4 +63,17 @@ class data extends Event implements \ArrayAccess
{
unset($this->data[$offset]);
}
+
+ /**
+ * Returns data with updated key in specified offset.
+ *
+ * @param string $offset Data array offset
+ * @param string $key Offset key
+ * @param mixed $value Value to update
+ * @return mixed Value of $value
+ */
+ public function update_subarray($offset, $key, $value)
+ {
+ return $this->data[$offset][$key] = $value;
+ }
}