/** * Kernel constructor. * * @param Application $app * @param Dispatcher $events */ public function __construct(Application $app, Dispatcher $events) { parent::__construct($app, $events); array_walk($this->bootstrappers, function (&$bootstrapper) { if ($bootstrapper === 'Illuminate\\Foundation\\Bootstrap\\ConfigureLogging') { $bootstrapper = 'Bootstrap\\ConfigureLogging'; } }); }
public function __construct(Application $app, Dispatcher $events) { parent::__construct($app, $events); $fs = new Filesystem(); $modules = new \Ormic\Modules(); foreach ($modules->getAll() as $name => $path) { $commandsDir = app_path() . '/../' . $path . '/Console/Commands'; $commandFiles = $fs->files($commandsDir); foreach ($commandFiles as $commandFile) { $command = substr(basename($commandFile), 0, -4); $this->commands[] = "Ormic\\modules\\{$name}\\Console\\Commands\\{$command}"; } } }
/** * Create a new console kernel instance. * * @param \Illuminate\Contracts\Foundation\Application $app * @param \Illuminate\Contracts\Events\Dispatcher $events * @return void */ public function __construct(Application $app, Dispatcher $events) { // Used in `functions.php` so that we know we can stop from launching // the whole theme when in `Console-Mode`, because our goal is to use // some of the functions of WordPress. if (!defined('ARTISAN_BINARY')) { define('ARTISAN_BINARY', 'artisan'); } // Load WordPress so we can use those functions WordPress supplies for us. if (!defined('WP_USE_THEMES')) { define('WP_USE_THEMES', false); } $wp_load = realpath(__DIR__ . '/../../../../../wp-load.php'); if (file_exists($wp_load)) { require_once $wp_load; } parent::__construct($app, $events); }
public function __construct(Application $app, Dispatcher $events) { parent::__construct($app, $events); }