1 | <?php |
||
11 | class Kernel |
||
12 | { |
||
13 | /** |
||
14 | * Array of registered commands. |
||
15 | * |
||
16 | * @var array |
||
17 | */ |
||
18 | protected $commands; |
||
19 | |||
20 | /** |
||
21 | * Construct. |
||
22 | * |
||
23 | * @param array|string $userConfig |
||
24 | * @param bool $merge |
||
25 | */ |
||
26 | public function __construct($userConfig = null, $merge = true) |
||
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) |
||
66 | |||
67 | /** |
||
68 | * Get array of all Yarak commands. |
||
69 | */ |
||
70 | protected function getApplicationCommands() |
||
82 | |||
83 | /** |
||
84 | * Get array of all user defined commands. |
||
85 | */ |
||
86 | protected function getUserCommands() |
||
98 | |||
99 | /** |
||
100 | * Validate the given command. |
||
101 | * |
||
102 | * @param Application $application |
||
103 | * @param InputInterface $input |
||
104 | * |
||
105 | * @throws InvalidInput |
||
106 | */ |
||
107 | protected function validateCommand(Application $application, InputInterface $input) |
||
115 | } |
||
116 |