phpBB API Documentation
Interface

phpbb\event\dispatcher_interface

interface dispatcher_interface implements EventDispatcherInterface

Extension of the Symfony2 EventDispatcher

It provides an additional trigger_event method, which gives some syntactic sugar for dispatching events. Instead of creating the event object, the method will do that for you.

Example:

$vars = array('pagetitle'); extract($phpbbdispatcher->trigger_event('core.index', compact($vars)));

Methods

mixed trigger_event(string $eventName, array $data = array())

Construct and dispatch an event

disable()

Disable the event dispatcher.

enable()

Enable the event dispatcher.

Details

at line 39
public mixed trigger_event(string $eventName, array $data = array())

Construct and dispatch an event

Parameters

string $eventName The event name
array $data An array containing the variables sending with the event

Return Value

mixed

at line 44
public disable()

Disable the event dispatcher.

at line 49
public enable()

Enable the event dispatcher.