1 | <?php |
||
12 | class Kernel |
||
13 | { |
||
14 | /** |
||
15 | * Application config. |
||
16 | * |
||
17 | * @var array |
||
18 | */ |
||
19 | private $config; |
||
20 | |||
21 | /** |
||
22 | * Construct. |
||
23 | * |
||
24 | * @param array $config |
||
25 | */ |
||
26 | public function __construct(array $config = []) |
||
30 | |||
31 | /** |
||
32 | * Handle an incoming console command. |
||
33 | */ |
||
34 | public function handle($input = null, $output = null) |
||
50 | |||
51 | /** |
||
52 | * Register all Yarak commands. |
||
53 | * |
||
54 | * @param Application $application |
||
55 | */ |
||
56 | protected function registerCommands(Application $application) |
||
62 | |||
63 | /** |
||
64 | * Validate the given command. |
||
65 | * |
||
66 | * @param Application $application |
||
67 | * @param InputInterface $input |
||
68 | * |
||
69 | * @throws InvalidInput |
||
70 | */ |
||
71 | protected function validateCommand(Application $application, InputInterface $input) |
||
79 | |||
80 | /** |
||
81 | * Return the Yarak config array. |
||
82 | * |
||
83 | * @return array |
||
84 | */ |
||
85 | public function getConfig() |
||
89 | } |
||
90 |