1 | <?php |
||
7 | class File |
||
8 | { |
||
9 | private $file; |
||
10 | |||
11 | private $format_name; |
||
12 | |||
13 | /** |
||
14 | * \brief Fill this object with another file. |
||
15 | * @param string $file File_id or local/remote path to the file. |
||
16 | * @param string $format_name Format name of the file (audio, document, ...) |
||
17 | */ |
||
18 | public function init(string $file, string $format_name) |
||
23 | |||
24 | /** |
||
25 | * \brief (<i>Internal</i>) Check if the path to the file given is local or a file_id/url. |
||
26 | * @return bool True if the file is a local path. |
||
27 | */ |
||
28 | public function is_local() : bool |
||
40 | |||
41 | /** |
||
42 | * \brief (<i>Internal</i>) Get string component of this file. |
||
43 | * @return string File as string (file_id/path to the file). |
||
44 | */ |
||
45 | public function getString() |
||
49 | |||
50 | public function getResource() |
||
60 | |||
61 | public function getFormatName() : string |
||
65 | } |
||
66 |