| 1 | <?php |
||
| 5 | class RawEvent extends AbstractEvent |
||
| 6 | { |
||
| 7 | |||
| 8 | const NAME = 'raw'; |
||
| 9 | |||
| 10 | /** |
||
| 11 | * @var array |
||
| 12 | */ |
||
| 13 | protected $raw; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * RawEvent constructor. |
||
| 17 | * |
||
| 18 | * @param string $senderId |
||
| 19 | * @param string $recipientId |
||
| 20 | * @param array $raw |
||
| 21 | */ |
||
| 22 | 1 | public function __construct(string $senderId, string $recipientId, array $raw) |
|
| 28 | |||
| 29 | /** |
||
| 30 | * @return array |
||
| 31 | */ |
||
| 32 | public function getRaw(): array |
||
| 33 | { |
||
| 34 | return $this->raw; |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return string |
||
| 39 | */ |
||
| 40 | public function getName(): string |
||
| 41 | { |
||
| 42 | return self::NAME; |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @param array $payload |
||
| 47 | * @return \Kerox\Messenger\Event\RawEvent |
||
| 48 | */ |
||
| 49 | 1 | public static function create(array $payload): RawEvent |
|
| 57 | } |
||
| 58 |