Total Complexity | 9 |
Total Lines | 66 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
18 | class Cli extends AbstractBootstrap |
||
19 | { |
||
20 | private $argv; |
||
21 | |||
22 | /** |
||
23 | * Run the application |
||
24 | * |
||
25 | * @return mixed |
||
26 | */ |
||
27 | public function run() |
||
28 | { |
||
29 | return $this->application->handle($this->options); |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * @return mixed |
||
34 | */ |
||
35 | public function setup() |
||
36 | { |
||
37 | $this->container = new PhCli(); |
||
38 | $this->providers = require appPath('cli/config/providers.php'); |
||
39 | |||
40 | $this->processArguments(); |
||
41 | |||
42 | parent::setup(); |
||
43 | } |
||
44 | |||
45 | /** |
||
46 | * Setup the application object in the container |
||
47 | * |
||
48 | * @return void |
||
49 | */ |
||
50 | protected function setupApplication() |
||
54 | } |
||
55 | |||
56 | /** |
||
57 | * Pass php argv |
||
58 | * |
||
59 | * @param array $argv |
||
60 | * @return void |
||
61 | */ |
||
62 | public function setArgv(array $argv): void |
||
63 | { |
||
64 | $this->argv = $argv; |
||
65 | } |
||
66 | |||
67 | /** |
||
68 | * Parses arguments from the command line |
||
69 | */ |
||
70 | private function processArguments() |
||
84 | } |
||
85 | } |
||
86 |