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 20
int handle(InputInterface $input, OutputInterface|null $output = null)

Handle an incoming console command.

Parameters

InputInterface $input
OutputInterface|null $output

Return Value

int

at line 25
void bootstrap()

Bootstrap the application for artisan commands.

Return Value

void

at line 30
void schedule(Schedule $schedule)

Define the application's command schedule.

Parameters

Schedule $schedule

Return Value

void

at line 35
Schedule resolveConsoleSchedule()

Resolve a console schedule instance.

Return Value

Schedule

at line 40
void commands()

Register the commands for the application.

Return Value

void

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

Register a Closure based command with the application.

Parameters

string $signature
Closure $callback

Return Value

ClosureCommand

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

Add loadPaths in the given directory.

Parameters

array|string $paths

Return Value

void

at line 57
Kernel addCommands(array $commands)

Set the Artisan commands provided by the application.

Parameters

array $commands

Return Value

Kernel

at line 64
Kernel addCommandPaths(array $paths)

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

Parameters

array $paths

Return Value

Kernel

at line 71
Kernel addCommandRoutePaths(array $paths)

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

Parameters

array $paths

Return Value

Kernel

at line 76
void registerCommand(Command $command)

Register the given command with the console application.

Parameters

Command $command

Return Value

void

at line 83
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 88
PendingDispatch queue(string $command, array $parameters = [])

Queue the given console command.

Parameters

string $command
array $parameters

Return Value

PendingDispatch

at line 93
array all()

Get all of the commands registered with the console.

Return Value

array

at line 98
string output()

Get the output for the last run command.

Return Value

string

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

Set the Artisan application instance.

Parameters

Application|null $artisan

Return Value

void

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

Terminate the application.

Parameters

InputInterface $input
int $status

Return Value

void

at line 113
Application getArtisan()

Get the Artisan application instance.

Return Value

Application