PHP Interface ManaPHP\Event\ManagerInterface

Datei anzeigen Open project: manaphp/manaphp

Public Methods

Method Description
attachEvent ( string $event, callable $handler ) : void Attach a listener to the events manager
fireEvent ( string $event, Component | Di $source, array $data = [] ) : boolean | null Fires an event in the events manager causing that the active listeners will be notified about it
peekEvents ( callable $handler ) : void

Method Details

attachEvent() public method

Attach a listener to the events manager
public attachEvent ( string $event, callable $handler ) : void
$event string
$handler callable
return void

fireEvent() public method

Fires an event in the events manager causing that the active listeners will be notified about it
public fireEvent ( string $event, Component | Di $source, array $data = [] ) : boolean | null
$event string
$source ManaPHP\Component | ManaPHP\Di
$data array
return boolean | null

peekEvents() public method

public peekEvents ( callable $handler ) : void
$handler callable
return void