mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-09 10:16:36 +02:00
[ticket/11444] Moving the in-board notifications to a method class
Currently the in-board method for the notifications is hardcoded and cannot be disabled. This method should be in his own class extending `phpbb\notification\method\method_interface`. It also add the possibility, for each method, to be enabled by default (ie: no entry in the DB => notification enabled). https://tracker.phpbb.com/browse/PHPBB3-11444 https://tracker.phpbb.com/browse/PHPBB3-11967 PHPBB3-11444
This commit is contained in:
committed by
Tristan Darricau
parent
58d1d37c16
commit
be0d4e20d4
@@ -52,7 +52,15 @@ class phpbb_mock_container_builder implements ContainerInterface
|
||||
{
|
||||
if ($this->has($id))
|
||||
{
|
||||
return $this->services[$id];
|
||||
$service = $this->services[$id];
|
||||
if (is_array($service) && is_callable($service[0]))
|
||||
{
|
||||
return call_user_func_array($service[0], $service[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
return $service;
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception('Could not find service: ' . $id);
|
||||
|
Reference in New Issue
Block a user