-
Notifications
You must be signed in to change notification settings - Fork 0
/
EventSubscriber.php
36 lines (32 loc) · 1.03 KB
/
EventSubscriber.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
/**
* Qubus\EventDispatcher
*
* @link https://github.com/QubusPHP/event-dispatcher
* @copyright 2020 Joshua Parker <[email protected]>
* @copyright 2018 Filip Štamcar (original author Tor Morten Jensen)
* @license https://opensource.org/licenses/mit-license.php MIT License
*/
declare(strict_types=1);
namespace Qubus\EventDispatcher;
interface EventSubscriber
{
/**
* Returns an array of event names this subscriber wants to listen to.
*
* The array key is the name of the hook. The value can be:
*
* * The method name. Priority defaults to 0.
* * An array with the method name and priority.
* * An array or arrays with method name and/or priority.
*
* For example:
*
* * ['eventName' => 'methodName']
* * ['eventName' => ['methodName', $priority]]
* * ['eventName' => [['methodName1', $priority], ['methodName2']]]
*
* @return array The event names to listen to.
*/
public static function getSubscribedEvents(): array;
}