class Kernel implements Kernel

Properties

protected Application $app

The application implementation.

protected Dispatcher $events

The event dispatcher implementation.

protected Application $artisan

The Artisan application instance.

protected array $commands

The Artisan commands provided by the application.

protected bool $commandsLoaded

Indicates if the Closure commands have been loaded.

protected array $bootstrappers

The bootstrap classes for the application.

Methods

void
__construct(Application $app, Dispatcher $events)

Create a new console kernel instance.

void
defineConsoleSchedule()

Define the application's command schedule.

int
handle(InputInterface $input, OutputInterface $output = null)

Run the console application.

void
terminate(InputInterface $input, int $status)

Terminate the application.

void
schedule(Schedule $schedule)

Define the application's command schedule.

void
commands()

Register the Closure based commands for the application.

command(string $signature, Closure $callback)

Register a Closure based command with the application.

void
registerCommand(Command $command)

Register the given command with the console application.

int
call(string $command, array $parameters = [], OutputInterface $outputBuffer = null)

Run an Artisan console command by name.

queue(string $command, array $parameters = [])

Queue the given console command.

array
all()

Get all of the commands registered with the console.

string
output()

Get the output for the last run command.

void
bootstrap()

Bootstrap the application for artisan commands.

getArtisan()

Get the Artisan application instance.

void
setArtisan(Application $artisan)

Set the Artisan application instance.

array
bootstrappers()

Get the bootstrap classes for the application.

void
reportException(Exception $e)

Report the exception to the exception handler.

void
renderException(OutputInterface $output, Exception $e)

Report the exception to the exception handler.

Details

at line 76
void __construct(Application $app, Dispatcher $events)

Create a new console kernel instance.

Parameters

Application $app
Dispatcher $events

Return Value

void

at line 95
protected void defineConsoleSchedule()

Define the application's command schedule.

Return Value

void

at line 111
int handle(InputInterface $input, OutputInterface $output = null)

Run the console application.

Parameters

InputInterface $input
OutputInterface $output

Return Value

int

at line 147
void terminate(InputInterface $input, int $status)

Terminate the application.

Parameters

InputInterface $input
int $status

Return Value

void

at line 158
protected void schedule(Schedule $schedule)

Define the application's command schedule.

Parameters

Schedule $schedule

Return Value

void

at line 168
protected void commands()

Register the Closure based commands for the application.

Return Value

void

at line 180
ClosureCommand command(string $signature, Closure $callback)

Register a Closure based command with the application.

Parameters

string $signature
Closure $callback

Return Value

ClosureCommand

at line 197
void registerCommand(Command $command)

Register the given command with the console application.

Parameters

Command $command

Return Value

void

at line 210
int call(string $command, array $parameters = [], OutputInterface $outputBuffer = null)

Run an Artisan console command by name.

Parameters

string $command
array $parameters
OutputInterface $outputBuffer

Return Value

int

at line 230
PendingDispatch queue(string $command, array $parameters = [])

Queue the given console command.

Parameters

string $command
array $parameters

Return Value

PendingDispatch

at line 240
array all()

Get all of the commands registered with the console.

Return Value

array

at line 252
string output()

Get the output for the last run command.

Return Value

string

at line 264
void bootstrap()

Bootstrap the application for artisan commands.

Return Value

void

at line 281
protected Application getArtisan()

Get the Artisan application instance.

Return Value

Application

at line 297
void setArtisan(Application $artisan)

Set the Artisan application instance.

Parameters

Application $artisan

Return Value

void

at line 307
protected array bootstrappers()

Get the bootstrap classes for the application.

Return Value

array

at line 318
protected void reportException(Exception $e)

Report the exception to the exception handler.

Parameters

Exception $e

Return Value

void

at line 330
protected void renderException(OutputInterface $output, Exception $e)

Report the exception to the exception handler.

Parameters

OutputInterface $output
Exception $e

Return Value

void