1 | <?php |
||
6 | class Download |
||
7 | { |
||
8 | /** |
||
9 | * Downloads a file. |
||
10 | * |
||
11 | * @param string $url The URL to download the file. |
||
12 | * @param string $directory The directory to download the file to. |
||
13 | * @param string $type The file type (zip|tar) to save the downloaded file as. |
||
14 | * |
||
15 | * @return string The path to the downloaded file on success and an empty string on failure. . |
||
16 | */ |
||
17 | public static function execute($url, $directory, $type) |
||
32 | |||
33 | /** |
||
34 | * Makes the downloaded files temporary name. |
||
35 | * |
||
36 | * @param string $directory The directory the file is downloaded to. |
||
37 | * @param string $type The file type (zip|tar) to save the downloaded file as. |
||
38 | * |
||
39 | * @return string The temporary file name. |
||
40 | */ |
||
41 | protected static function makeTempName($directory, $type) |
||
45 | } |
||
46 |