| Total Complexity | 3 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class telegram extends request { |
||
| 11 | public function __call (string $name, array $arguments) { |
||
| 12 | return request::$name(...$arguments); |
||
| 13 | } |
||
| 14 | |||
| 15 | /** |
||
| 16 | * download telegram file with file_id to destination location |
||
| 17 | * |
||
| 18 | * It has 20MB download limit(same as telegram) |
||
| 19 | * |
||
| 20 | * e.g. => tools::downloadFile('test.mp4'); |
||
| 21 | * |
||
| 22 | * e.g. => tools::downloadFile('test.mp4','file_id_asdadadadadadad); |
||
| 23 | * |
||
| 24 | * @param string|null $destination destination for save the file |
||
| 25 | * @param string|null $file_id file_id for download, if not set, will generate by request::catchFields method |
||
| 26 | * |
||
| 27 | * @return bool |
||
| 28 | */ |
||
| 29 | public static function downloadFile (string|null $destination = null, string|null $file_id = null): bool { |
||
| 37 | } |
||
| 38 | } |
||
| 39 | } |