| 1 | <?php |
||
| 12 | class PrePublishMessage extends Event |
||
| 13 | { |
||
| 14 | const NAME = 'happyr.mq2php.pre_publish_message'; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * This is the json message before we run json_encode. |
||
| 18 | * |
||
| 19 | * @var array |
||
| 20 | */ |
||
| 21 | private $message; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * The class/type from the original message (command/event). |
||
| 25 | 1 | * |
|
| 26 | * @var string |
||
| 27 | 1 | */ |
|
| 28 | 1 | private $type; |
|
| 29 | |||
| 30 | /** |
||
| 31 | * @param array $message |
||
| 32 | * @param string $type |
||
| 33 | 1 | */ |
|
| 34 | public function __construct(array $message, $type) |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @return array |
||
| 42 | */ |
||
| 43 | public function getMessage() |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @param array $message |
||
| 50 | * |
||
| 51 | * @return PrePublishMessage |
||
| 52 | */ |
||
| 53 | public function setMessage(array $message) |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @return string |
||
| 62 | */ |
||
| 63 | public function getType() |
||
| 67 | } |
||
| 68 |