mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[feature/event-dispatcher] Use real EventDispatcher through composer
* replace the copy-pasta EventDispatcher with the real one from Symfony2 * use composer for managing this dependency, use composer autoloading PHPBB3-9550
This commit is contained in:
@@ -15,7 +15,9 @@ if (!defined('IN_PHPBB'))
|
||||
exit;
|
||||
}
|
||||
|
||||
class phpbb_event_data extends phpbb_event implements ArrayAccess
|
||||
use Symfony\Component\EventDispatcher\Event;
|
||||
|
||||
class phpbb_event_data extends Event implements ArrayAccess
|
||||
{
|
||||
private $data;
|
||||
|
||||
|
@@ -15,12 +15,14 @@ if (!defined('IN_PHPBB'))
|
||||
exit;
|
||||
}
|
||||
|
||||
use Symfony\Component\EventDispatcher\EventDispatcher;
|
||||
|
||||
class phpbb_event_extension_subscriber_loader
|
||||
{
|
||||
private $dispatcher;
|
||||
private $extension_manager;
|
||||
|
||||
public function __construct(phpbb_event_dispatcher $dispatcher, phpbb_extension_manager $extension_manager)
|
||||
public function __construct(EventDispatcher $dispatcher, phpbb_extension_manager $extension_manager)
|
||||
{
|
||||
$this->dispatcher = $dispatcher;
|
||||
$this->extension_manager = $extension_manager;
|
||||
@@ -37,7 +39,7 @@ class phpbb_event_extension_subscriber_loader
|
||||
|
||||
foreach ($subscriber_classes as $class) {
|
||||
$subscriber = new $class();
|
||||
$this->dispatcher->add_subscriber($subscriber);
|
||||
$this->dispatcher->addSubscriber($subscriber);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user