Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 148 | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
/*
4
 * This file is part of Psy Shell.
5
 *
200 lars 6
 * (c) 2012-2023 Justin Hileman
148 lars 7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
 
12
namespace Psy\VersionUpdater;
13
 
14
use Psy\Exception\ErrorException;
15
 
16
interface Downloader
17
{
18
    /**
19
     * Set the directory where the download will be written to.
20
     *
21
     * @param string $tempDir
22
     */
23
    public function setTempDir(string $tempDir);
24
 
25
    /**
26
     * @param string $url
27
     *
28
     * @throws ErrorException on failure
29
     */
30
    public function download(string $url): bool;
31
 
32
    /**
33
     * Get the temporary file name the download was written to.
34
     */
35
    public function getFilename(): string;
36
 
37
    /**
38
     * Delete the downloaded file if it exists.
39
     *
40
     * @return void
41
     */
42
    public function cleanup();
43
}