| 1 | <?php |
||
| 9 | abstract class EventBase |
||
| 10 | {
|
||
| 11 | /** |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | protected $eventName; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | protected $payload; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var string |
||
| 23 | */ |
||
| 24 | protected $delivery; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * EventBase constructor. |
||
| 28 | * @param string $eventName |
||
| 29 | * @param string $payload |
||
| 30 | * @param string $delivery |
||
| 31 | */ |
||
| 32 | public function __construct($eventName, $payload, $delivery = null) |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @return string |
||
| 41 | */ |
||
| 42 | abstract public function getEventName(); |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @return string |
||
| 46 | */ |
||
| 47 | public function getPayload() |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @return string |
||
| 54 | */ |
||
| 55 | public function getDelivery() |
||
| 59 | } |
||
| 60 |