1 | <?php |
||
12 | class CopyRequest extends BaseRequest |
||
13 | { |
||
14 | /** @var string */ |
||
15 | private $destination; |
||
16 | |||
17 | /** @var resource<stream<plainfile>> */ |
||
18 | private $fp; |
||
19 | |||
20 | private $success = false; |
||
21 | |||
22 | protected static $defaultCurlOptions = array( |
||
23 | CURLOPT_HTTPGET => true, |
||
24 | CURLOPT_FOLLOWLOCATION => true, |
||
25 | CURLOPT_MAXREDIRS => 20, |
||
26 | CURLOPT_ENCODING => '', |
||
27 | ); |
||
28 | |||
29 | /** |
||
30 | * @param string $url |
||
31 | * @param string $destination |
||
32 | * @param bool $useRedirector |
||
33 | * @param IO\IOInterface $io |
||
34 | * @param Config $config |
||
35 | */ |
||
36 | public function __construct($url, $destination, $useRedirector, IO\IOInterface $io, Config $config) |
||
43 | |||
44 | public function __destruct() |
||
56 | |||
57 | public function makeSuccess() |
||
61 | |||
62 | /** |
||
63 | * @return array |
||
64 | */ |
||
65 | public function getCurlOptions() |
||
71 | |||
72 | /** |
||
73 | * @param string |
||
74 | */ |
||
75 | public function setDestination($destination) |
||
93 | |||
94 | private function createDir($fileName) |
||
105 | } |
||
106 |