Conditions | 3 |
Paths | 4 |
Total Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
22 | public static function call( |
||
23 | $command, |
||
24 | array $arguments = [], |
||
25 | DiInterface $di = null, |
||
26 | $debug = false |
||
27 | ) { |
||
28 | $di = is_null($di) ? DI::getDefault() : $di; |
||
29 | |||
30 | $kernel = $di->get('yarak'); |
||
31 | |||
32 | $input = new ArrayInput(['command' => $command] + $arguments); |
||
33 | |||
34 | if ($debug) { |
||
35 | $kernel->handle($input, $output = new BufferedOutput()); |
||
36 | |||
37 | return $output; |
||
38 | } |
||
39 | |||
40 | $kernel->handle($input, new NullOutput()); |
||
41 | } |
||
42 | } |
||
43 |