@@ 141-148 (lines=8) @@ | ||
138 | * |
|
139 | * @return static |
|
140 | */ |
|
141 | public static function create(array $payload) |
|
142 | { |
|
143 | $text = isset($payload['text']) ? $payload['text'] : null; |
|
144 | $attachments = isset($payload['attachments']) ? $payload['attachments'] : []; |
|
145 | $quickReply = isset($payload['quick_reply']) ? $payload['quick_reply']['payload'] : null; |
|
146 | ||
147 | return new static($payload['mid'], $payload['seq'], $text, $attachments, $quickReply); |
|
148 | } |
|
149 | } |
|
150 |
@@ 70-77 (lines=8) @@ | ||
67 | * |
|
68 | * @return static |
|
69 | */ |
|
70 | public static function create(array $payload) |
|
71 | { |
|
72 | $metadata = isset($payload['metadata']) ? $payload['metadata'] : null; |
|
73 | $text = isset($payload['text']) ? $payload['text'] : null; |
|
74 | $attachments = isset($payload['attachments']) ? $payload['attachments'] : []; |
|
75 | ||
76 | return new static(true, $payload['app_id'], $payload['mid'], $payload['seq'], $metadata, $text, $attachments); |
|
77 | } |
|
78 | } |
|
79 |