mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/14557] Simplify updating overloaded events for extensions
PHPBB3-14557
This commit is contained in:
parent
453d9113f1
commit
60251cd623
1 changed files with 13 additions and 0 deletions
|
@ -63,4 +63,17 @@ class data extends Event implements \ArrayAccess
|
||||||
{
|
{
|
||||||
unset($this->data[$offset]);
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue