Kernel (Foundation)

Kernel

class Kernel implements Kernel (View source)

Methods

void __construct(Application $app, Dispatcher $events)

Create a new console kernel instance.

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

Run the console application.

void terminate(InputInterface $input, int $status)

Terminate the application.

ClosureCommand 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 = array())

Run an Artisan console command by name.

int queue(string $command, array $parameters = array())

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.

void setArtisan(Application $artisan)

Set the Artisan application instance.

Details

void __construct(Application $app, Dispatcher $events)

Create a new console kernel instance.

Parameters

Application $app
Dispatcher $events

Return Value

void

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

Run the console application.

Parameters

InputInterface $input
OutputInterface $output

Return Value

int

void terminate(InputInterface $input, int $status)

Terminate the application.

Parameters

InputInterface $input
int $status

Return Value

void

ClosureCommand command(string $signature, Closure $callback)

Register a Closure based command with the application.

Parameters

string $signature
Closure $callback

Return Value

ClosureCommand

void registerCommand(Command $command)

Register the given command with the console application.

Parameters

Command $command

Return Value

void

int call(string $command, array $parameters = array())

Run an Artisan console command by name.

Parameters

string $command
array $parameters

Return Value

int

int queue(string $command, array $parameters = array())

Queue the given console command.

Parameters

string $command
array $parameters

Return Value

int

array all()

Get all of the commands registered with the console.

Return Value

array

string output()

Get the output for the last run command.

Return Value

string

void bootstrap()

Bootstrap the application for artisan commands.

Return Value

void

void setArtisan(Application $artisan)

Set the Artisan application instance.

Parameters

Application $artisan

Return Value

void

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.3/Illuminate/Foundation/Console/Kernel.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部