interface Kernel

Methods

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

Handle an incoming console command.

void
bootstrap()

Bootstrap the application for artisan commands.

void
schedule(Schedule $schedule)

Define the application's command schedule.

resolveConsoleSchedule()

Resolve a console schedule instance.

void
commands()

Register the commands for the application.

command(string $signature, Closure $callback)

Register a Closure based command with the application.

void
load(array|string $paths)

Add loadPaths in the given directory.

addCommands(array $commands)

Set the Artisan commands provided by the application.

addCommandPaths(array $paths)

Set the paths that should have their Artisan commands automatically discovered.

addCommandRoutePaths(array $paths)

Set the paths that should have their Artisan "routes" automatically discovered.

void
registerCommand(Command $command)

Register the given command with the console application.

int
call(string $command, array $parameters = [], OutputInterface|null $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
setArtisan(Application|null $artisan)

Set the Artisan application instance.

void
terminate(InputInterface $input, int $status)

Terminate the application.

getArtisan()

Get the Artisan application instance.

Details

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

Handle an incoming console command.

Parameters

InputInterface $input
OutputInterface|null $output

Return Value

int

at line 26
void bootstrap()

Bootstrap the application for artisan commands.

Return Value

void

at line 31
void schedule(Schedule $schedule)

Define the application's command schedule.

Parameters

Schedule $schedule

Return Value

void

at line 36
Schedule resolveConsoleSchedule()

Resolve a console schedule instance.

Return Value

Schedule

at line 41
void commands()

Register the commands for the application.

Return Value

void

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

Register a Closure based command with the application.

Parameters

string $signature
Closure $callback

Return Value

ClosureCommand

at line 51
void load(array|string $paths)

Add loadPaths in the given directory.

Parameters

array|string $paths

Return Value

void

at line 58
Kernel addCommands(array $commands)

Set the Artisan commands provided by the application.

Parameters

array $commands

Return Value

Kernel

at line 65
Kernel addCommandPaths(array $paths)

Set the paths that should have their Artisan commands automatically discovered.

Parameters

array $paths

Return Value

Kernel

at line 72
Kernel addCommandRoutePaths(array $paths)

Set the paths that should have their Artisan "routes" automatically discovered.

Parameters

array $paths

Return Value

Kernel

at line 77
void registerCommand(Command $command)

Register the given command with the console application.

Parameters

Command $command

Return Value

void

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

Run an Artisan console command by name.

Parameters

string $command
array $parameters
OutputInterface|null $outputBuffer

Return Value

int

Exceptions

CommandNotFoundException

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

Queue the given console command.

Parameters

string $command
array $parameters

Return Value

PendingDispatch

at line 94
array all()

Get all of the commands registered with the console.

Return Value

array

at line 99
string output()

Get the output for the last run command.

Return Value

string

at line 104
void setArtisan(Application|null $artisan)

Set the Artisan application instance.

Parameters

Application|null $artisan

Return Value

void

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

Terminate the application.

Parameters

InputInterface $input
int $status

Return Value

void

at line 114
Application getArtisan()

Get the Artisan application instance.

Return Value

Application