public function bootstrap() { parent::bootstrap(); $em = \App::make(EntityManager::class); $this->getArtisan()->getHelperSet()->set(new \Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper($em->getConnection()), 'db'); $this->getArtisan()->getHelperSet()->set(new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper($em), 'em'); }
/** * Bootstrap the application for artisan commands. */ public function bootstrap() { parent::bootstrap(); // Only register the reset command on the local environment if ($this->app->environment() === 'local') { $this->commands[] = ResetApp::class; } }
/** * 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'; } }); }
/** * Run the console application. * * @param \Symfony\Component\Console\Input\InputInterface $input * @param \Symfony\Component\Console\Output\OutputInterface $output * @return int */ public function handle($input, $output = null) { try { return parent::handle($input, $output); } catch (Exception $e) { $output->writeln((string) $e); return 1; } }
/** * Bootstrap the application for artisan commands. * * @return void */ public function bootstrap() { $args = func_get_args(); $withXE = array_shift($args); if (!$this->isInstalled() && $withXE !== true) { $this->resetForFramework(); } else { $this->setCommandAfterInstall(); } parent::bootstrap(); }
/** * Call the Laravel command to generate file. * * @param string $command * @param array $parameters * * @return array */ private function callLaravel($command, array $parameters) { $level = 'info'; try { $this->artisan->call($command, $parameters); $output = $this->artisan->output(); } catch (\Exception $e) { $output = $e->getMessage(); $level = 'danger'; } return compact('output', 'level'); }
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 bootstrap() { parent::bootstrap(); $this->app->singleton('command.key.generate', KeyGenerateCommand::class); }
protected function schedule(Schedule $schedule) { parent::schedule($schedule); }
protected function renderException($output, Exception $e) { parent::renderException($output, $e); // TODO: Change the autogenerated stub }
/** * Bootstrap the application for Console. */ public function bootstrap() { parent::bootstrap(); $registrar = new GeneratorCommandRegistrar($this->app); $this->commands = array_merge($this->commands, $registrar->register(), $this->app[AddonEnvironment::class]->addonConsoleCommands()); }
public function __construct(Application $app, Dispatcher $events) { parent::__construct($app, $events); }
public function bootstrap() { parent::bootstrap(); }