class Illuminate / Foundation / Console / Kernel
You are viewing an older version of the documentation. For the latest, please visit master documentation.

Kernel

Implements

Properties

protected

$app Application

The application implementation.

Default: null
protected

$events Dispatcher

The event dispatcher implementation.

Default: null
protected

$artisan Application |null

The Artisan application instance.

Default: null
protected

$commands array

The Artisan commands provided by the application.

Default: []
protected

$commandsLoaded bool

Indicates if the Closure commands have been loaded.

Default: false
protected

$bootstrappers string[]

The bootstrap classes for the application.

Default: array

Methods

public

__construct ( Application $app , Dispatcher $events ) : void

Create a new console kernel instance.

Parameters

protected

defineConsoleSchedule ( ) : void

Define the application's command schedule.

protected

scheduleCache ( ) : string

Get the name of the cache store that should manage scheduling mutexes.

public

handle ( $input , $output ) : int

Run the console application.

Parameters

  • $input Symfony\...\InputInterface
  • $output Symfony\...\OutputInterface|null
public

terminate ( $input , $status ) : void

Terminate the application.

Parameters

  • $input Symfony\...\InputInterface
  • $status int
protected

schedule ( Schedule $schedule ) : void

Define the application's command schedule.

Parameters

protected

scheduleTimezone ( ) : DateTimeZone |string|null

Get the timezone that should be used by default for scheduled events.

protected

commands ( ) : void

Register the commands for the application.

public

command ( $signature , Closure $callback ) : ClosureCommand

Register a Closure based command with the application.

Parameters

protected

load ( $paths ) : void

Register all of the commands in the given directory.

Parameters

  • $paths array|string
public

registerCommand ( $command ) : void

Register the given command with the console application.

Parameters

  • $command Symfony\...\Command
public

call ( $command , array $parameters , $outputBuffer ) : int

Run an Artisan console command by name.

Parameters

  • $command string
  • $parameters array
  • $outputBuffer Symfony\...\OutputInterface|null
public

queue ( $command , array $parameters ) : PendingDispatch

Queue the given console command.

Parameters

  • $command string
  • $parameters array
public

all ( ) : array

Get all of the commands registered with the console.

public

output ( ) : string

Get the output for the last run command.

public

bootstrap ( ) : void

Bootstrap the application for artisan commands.

protected

getArtisan ( ) : Application

Get the Artisan application instance.

public

setArtisan ( $artisan ) : void

Set the Artisan application instance.

Parameters

protected

bootstrappers ( ) : array

Get the bootstrap classes for the application.

protected

reportException ( Throwable $e ) : void

Report the exception to the exception handler.

Parameters

protected

renderException ( $output , Throwable $e ) : void

Render the given exception.

Parameters

  • $output Symfony\...\OutputInterface
  • $e Throwable