mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-25 20:58:55 +00:00
Merge pull request #4530 from senky/ticket/14557
[ticket/14557] Simplify updating overloaded events for extensions
This commit is contained in:
commit
ecef296bee
1 changed files with 12 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue