1 | <?php |
||
20 | abstract class PayloadHandler implements PayloadHandlerInterface |
||
21 | { |
||
22 | /** |
||
23 | * @var MessageInterface |
||
24 | */ |
||
25 | protected $message; |
||
26 | |||
27 | /** |
||
28 | * @var int |
||
29 | */ |
||
30 | protected $notificationId; |
||
31 | |||
32 | /** |
||
33 | * @param MessageInterface $message |
||
34 | * @return bool |
||
35 | */ |
||
36 | abstract public function isSupported(MessageInterface $message); |
||
37 | |||
38 | /** |
||
39 | * @param MessageInterface $message |
||
40 | * @return $this |
||
41 | */ |
||
42 | public function setMessage(MessageInterface $message) |
||
52 | |||
53 | /** |
||
54 | * @param int $id |
||
55 | * @return $this |
||
56 | */ |
||
57 | public function setNotificationId($id) |
||
62 | |||
63 | /** |
||
64 | * Gets maximum size allowed for notification payload |
||
65 | * |
||
66 | * @return int |
||
67 | */ |
||
68 | public function getPayloadMaxLength() |
||
72 | |||
73 | /** |
||
74 | * @return array |
||
75 | */ |
||
76 | public function getCustomNotificationData() |
||
80 | |||
81 | /** |
||
82 | * Check if maximum size allowed for a notification payload exceeded |
||
83 | * |
||
84 | * @param string $packedPayload |
||
85 | * @throws MalformedNotificationException |
||
86 | */ |
||
87 | public function validatePayload($packedPayload) |
||
102 | } |
||
103 |