Kernel
Implements
Uses
Properties
$symfonyDispatcher Symfony\...\EventDispatcherInterface|null
The Symfony event dispatcher implementation.
$commands array
The Artisan commands provided by the application.
$commandsLoaded bool
Indicates if the Closure commands have been loaded.
$commandLifecycleDurationHandlers array
All of the registered command duration handlers.
$bootstrappers string[]
The bootstrap classes for the application.
Methods
__construct ( Application $app , Dispatcher $events ) : void
Create a new console kernel instance.
Parameters
- $app Application
- $events Dispatcher
rerouteSymfonyCommandEvents ( ) : $this
Re-route the Symfony command events to their Laravel counterparts.
defineConsoleSchedule ( ) : void
Define the application's command schedule.
scheduleCache ( ) : string
Get the name of the cache store that should manage scheduling mutexes.
handle ( $input , $output ) : int
Run the console application.
Parameters
- $input Symfony\...\InputInterface
- $output Symfony\...\OutputInterface|null
terminate ( $input , $status ) : void
Terminate the application.
Parameters
- $input Symfony\...\InputInterface
- $status int
whenCommandLifecycleIsLongerThan ( $threshold , $handler ) : void
Register a callback to be invoked when the command lifecycle duration exceeds a given amount of time.
Parameters
- $threshold DateTimeInterface |Carbon\CarbonInterval|float|int
- $handler callable
schedule ( Schedule $schedule ) : void
Define the application's command schedule.
Parameters
- $schedule Schedule
scheduleTimezone ( ) : DateTimeZone |string|null
Get the timezone that should be used by default for scheduled events.
commands ( ) : void
Register the commands for the application.
command ( $signature , Closure $callback ) : ClosureCommand
Register a Closure based command with the application.
Parameters
- $signature string
- $callback Closure
load ( $paths ) : void
Register all of the commands in the given directory.
Parameters
- $paths array|string
commandClassFromFile ( SplFileInfo $file , string $namespace ) : string
Extract the command class name from the given file path.
Parameters
- $file SplFileInfo
- $namespace string
registerCommand ( $command ) : void
Register the given command with the console application.
Parameters
- $command Symfony\...\Command
call ( $command , array $parameters , $outputBuffer ) : int
Run an Artisan console command by name.
Parameters
- $command string
- $parameters array
- $outputBuffer Symfony\...\OutputInterface|null
queue ( $command , array $parameters ) : PendingDispatch
Queue the given console command.
Parameters
- $command string
- $parameters array
all ( ) : array
Get all of the commands registered with the console.
output ( ) : string
Get the output for the last run command.
bootstrap ( ) : void
Bootstrap the application for artisan commands.
bootstrapWithoutBootingProviders ( ) : void
Bootstrap the application without booting service providers.
setArtisan ( $artisan ) : void
Set the Artisan application instance.
Parameters
- $artisan Application |null
bootstrappers ( ) : array
Get the bootstrap classes for the application.