-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathManagerInterface.php
44 lines (40 loc) · 1.12 KB
/
ManagerInterface.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
37
38
39
40
41
42
43
44
<?php
/**
* @author MageHook <[email protected]>
* @package MageHook_Hook
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*/
namespace MageHook\Hook;
/**
* Interface ManagerInterface
*
* @package MageHook\Hook
*/
interface ManagerInterface
{
public const WRAPPER_DK_EVENT = 'event';
public const WRAPPER_DK_WEBHOOK = 'webhook';
public const WRAPPER_DK_BODY = 'body';
public const WRAPPER_DK_RESOURCE = 'resource';
public const WRAPPER_DK_METADATA = 'meta_data';
/**
* Calls all observer callbacks registered for this webhook
* and multiple observers matching webhook name pattern.
*
* @param string $event Event name
* @param array|object $data Body data
* @param array $metadata Additional meta data
* @return void
*/
public function dispatch($event, $data, $metadata = []): void;
/**
* @alias dispatch
*
* @param $event
* @param $data
* @param array $metadata
*/
public function fire($event, $data, $metadata = []): void;
}