1 | <?php |
||
23 | class File |
||
24 | { |
||
25 | private $file; |
||
26 | |||
27 | private $format_name; |
||
28 | |||
29 | /** |
||
30 | * \brief Fill this object with another file. |
||
31 | * @param string $file File_id or local/remote path to the file. |
||
32 | * @param string $format_name Format name of the file (audio, document, ...) |
||
33 | */ |
||
34 | public function init(string $file, string $format_name) |
||
39 | |||
40 | /** |
||
41 | * \brief (<i>Internal</i>) Check if the path to the file given is local or a file_id/url. |
||
42 | * @return bool True if the file is a local path. |
||
43 | */ |
||
44 | public function is_local() : bool |
||
61 | |||
62 | /** |
||
63 | * \brief (<i>Internal</i>) Get string component of this file. |
||
64 | * @return string File as string (file_id/path to the file). |
||
65 | */ |
||
66 | public function getString() |
||
70 | |||
71 | public function getResource() |
||
81 | |||
82 | public function getFormatName() : string |
||
86 | } |
||
87 |