| @@ 169-179 (lines=11) @@ | ||
| 166 | * |
|
| 167 | * @return array |
|
| 168 | */ |
|
| 169 | public function transformMaterial(AbstractMessage $message) |
|
| 170 | { |
|
| 171 | $type = $message->getType(); |
|
| 172 | ||
| 173 | return [ |
|
| 174 | 'msgtype' => $type, |
|
| 175 | $type => [ |
|
| 176 | 'media_id' => $message->get('media_id'), |
|
| 177 | ], |
|
| 178 | ]; |
|
| 179 | } |
|
| 180 | ||
| 181 | /** |
|
| 182 | * Transform wxcard message. |
|
| @@ 186-196 (lines=11) @@ | ||
| 183 | * |
|
| 184 | * @return array |
|
| 185 | */ |
|
| 186 | public function transformCard(AbstractMessage $message) |
|
| 187 | { |
|
| 188 | $type = $message->getType(); |
|
| 189 | ||
| 190 | return [ |
|
| 191 | 'msgtype' => $type, |
|
| 192 | $type => [ |
|
| 193 | 'card_id' => $message->get('card_id'), |
|
| 194 | ], |
|
| 195 | ]; |
|
| 196 | } |
|
| 197 | } |
|
| 198 | ||