1 | <?php |
||
22 | class UpdateDatabaseCommand extends Command |
||
23 | { |
||
24 | /** |
||
25 | * @var Stopwatch |
||
26 | */ |
||
27 | private $stopwatch; |
||
28 | |||
29 | /** |
||
30 | * @var CompressorInterface |
||
31 | */ |
||
32 | private $compressor; |
||
33 | |||
34 | /** |
||
35 | * @var Filesystem |
||
36 | */ |
||
37 | private $fs; |
||
38 | |||
39 | /** |
||
40 | * @var string |
||
41 | */ |
||
42 | private $url = ''; |
||
43 | |||
44 | /** |
||
45 | * @var string |
||
46 | */ |
||
47 | private $cache = ''; |
||
48 | |||
49 | /** |
||
50 | * @param Filesystem $fs |
||
51 | * @param Stopwatch $stopwatch |
||
52 | * @param CompressorInterface $compressor |
||
53 | * @param string $url |
||
54 | * @param string $cache |
||
55 | */ |
||
56 | public function __construct(Filesystem $fs, Stopwatch $stopwatch, CompressorInterface $compressor, $url, $cache) |
||
66 | |||
67 | protected function configure() |
||
86 | |||
87 | /** |
||
88 | * @param InputInterface $input |
||
89 | * @param OutputInterface $output |
||
90 | * |
||
91 | * @return int |
||
92 | */ |
||
93 | protected function execute(InputInterface $input, OutputInterface $output) |
||
121 | |||
122 | /** |
||
123 | * @param string $url |
||
124 | * @param string $target |
||
125 | */ |
||
126 | private function download($url, $target) |
||
137 | |||
138 | /** |
||
139 | * @param SymfonyStyle $io |
||
140 | * @param StopwatchEvent $event |
||
141 | */ |
||
142 | private function stopwatch(SymfonyStyle $io, StopwatchEvent $event) |
||
149 | } |
||
150 |