1 | <?php |
||
16 | abstract class TelegramMethods implements TelegramMethodDefinitions |
||
17 | { |
||
18 | /** |
||
19 | * Most of the methods will return a Message object on success, so set that as the default. |
||
20 | * |
||
21 | * This function may however be overwritten if the method uses another object, there are many examples of this, so |
||
22 | * just check out the rest of the code. A good place to start is GetUserProfilePhotos or LeaveChat |
||
23 | * |
||
24 | * @see unreal4u\TelegramAPI\Telegram\Methods\GetUserProfilePhotos |
||
25 | * @see unreal4u\TelegramAPI\Telegram\Methods\LeaveChat |
||
26 | * |
||
27 | * @param TelegramRawData $data |
||
28 | * @param LoggerInterface $logger |
||
29 | * |
||
30 | * @return TelegramTypes |
||
31 | 8 | */ |
|
32 | public static function bindToObject(TelegramRawData $data, LoggerInterface $logger): TelegramTypes |
||
36 | |||
37 | /** |
||
38 | * Before making the actual request this method will be called |
||
39 | * |
||
40 | * It must be used to json_encode stuff, or do other changes in the internal class representation _before_ sending |
||
41 | * it to the Telegram servers |
||
42 | * |
||
43 | * @return TelegramMethods |
||
44 | 22 | */ |
|
45 | public function performSpecialConditions(): TelegramMethods |
||
53 | |||
54 | public function export(): array |
||
75 | } |
||
76 |