]> BookStack Code Mirror - bookstack/blob - app/Console/Kernel.php
02c8c00e61135c6c33c86831944350b6f2eeb36c
[bookstack] / app / Console / Kernel.php
1 <?php
2
3 namespace BookStack\Console;
4
5 use BookStack\Facades\Theme;
6 use BookStack\Theming\ThemeService;
7 use Illuminate\Console\Scheduling\Schedule;
8 use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
9 use Symfony\Component\Console\Command\Command;
10
11 class Kernel extends ConsoleKernel
12 {
13     /**
14      * The Artisan commands provided by your application.
15      *
16      * @var array
17      */
18     protected $commands = [
19         //
20     ];
21
22     /**
23      * Define the application's command schedule.
24      *
25      * @param \Illuminate\Console\Scheduling\Schedule $schedule
26      *
27      * @return void
28      */
29     protected function schedule(Schedule $schedule)
30     {
31         //
32     }
33
34     /**
35      * Register the commands for the application.
36      *
37      * @return void
38      */
39     protected function commands()
40     {
41         // Default framework command loading from 'Commands' directory
42         $this->load(__DIR__ . '/Commands');
43
44         // Load any user commands that have been registered via the theme system.
45         $themeService = $this->app->make(ThemeService::class);
46         foreach ($themeService->getRegisteredCommands() as $command) {
47             $this->registerCommand($command);
48         }
49     }
50 }