Kernel
class Kernel implements Kernel (View source)
Traits
Properties
protected Application | $app | The application implementation. |
|
protected Dispatcher | $events | The event dispatcher implementation. |
|
protected EventDispatcherInterface|null | $symfonyDispatcher | The Symfony event dispatcher implementation. |
|
protected Application|null | $artisan | The Artisan application instance. |
|
protected array | $commands | The Artisan commands provided by the application. |
|
protected array | $commandPaths | The paths where Artisan commands should be automatically discovered. |
|
protected array | $commandRoutePaths | The paths where Artisan "routes" should be automatically discovered. |
|
protected bool | $commandsLoaded | Indicates if the Closure commands have been loaded. |
|
protected array | $loadedPaths | The commands paths that have been "loaded". |
|
protected array | $commandLifecycleDurationHandlers | All of the registered command duration handlers. |
|
protected Carbon|null | $commandStartedAt | When the currently handled command started. |
|
protected string[] | $bootstrappers | The bootstrap classes for the application. |
Methods
Get the number of seconds until the given DateTime.
If the given value is an interval, convert it to a DateTime instance.
Given a start time, format the total run time for human readability.
Re-route the Symfony command events to their Laravel counterparts.
Run the console application.
Terminate the application.
Register a callback to be invoked when the command lifecycle duration exceeds a given amount of time.
When the command being handled started.
Resolve a console schedule instance.
Get the timezone that should be used by default for scheduled events.
Get the name of the cache store that should manage scheduling mutexes.
Register the commands for the application.
Register all of the commands in the given directory.
Extract the command class name from the given file path.
Register the given command with the console application.
Run an Artisan console command by name.
Queue the given console command.
Get all of the commands registered with the console.
Get the output for the last run command.
Bootstrap the application for artisan commands.
Discover the commands that should be automatically loaded.
Bootstrap the application without booting service providers.
Determine if the kernel should discover commands.
Get the Artisan application instance.
Set the Artisan commands provided by the application.
Set the paths that should have their Artisan commands automatically discovered.
Set the paths that should have their Artisan "routes" automatically discovered.
Get the bootstrap classes for the application.
Details
protected int
secondsUntil(DateTimeInterface|DateInterval|int $delay)
Get the number of seconds until the given DateTime.
protected int
availableAt(DateTimeInterface|DateInterval|int $delay = 0)
Get the "available at" UNIX timestamp.
protected DateTimeInterface|int
parseDateInterval(DateTimeInterface|DateInterval|int $delay)
If the given value is an interval, convert it to a DateTime instance.
protected string
runTimeForHumans(float $startTime, float $endTime = null)
Given a start time, format the total run time for human readability.
$this
rerouteSymfonyCommandEvents()
internal |
Re-route the Symfony command events to their Laravel counterparts.
void
whenCommandLifecycleIsLongerThan(DateTimeInterface|CarbonInterval|float|int $threshold, callable $handler)
Register a callback to be invoked when the command lifecycle duration exceeds a given amount of time.
protected DateTimeZone|string|null
scheduleTimezone()
Get the timezone that should be used by default for scheduled events.
protected string|null
scheduleCache()
Get the name of the cache store that should manage scheduling mutexes.
ClosureCommand
command(string $signature, Closure $callback)
Register a Closure based command with the application.
protected string
commandClassFromFile(SplFileInfo $file, string $namespace)
Extract the command class name from the given file path.
int
call(string $command, array $parameters = [], OutputInterface|null $outputBuffer = null)
Run an Artisan console command by name.
void
bootstrapWithoutBootingProviders()
Bootstrap the application without booting service providers.
$this
addCommandPaths(array $paths)
Set the paths that should have their Artisan commands automatically discovered.
$this
addCommandRoutePaths(array $paths)
Set the paths that should have their Artisan "routes" automatically discovered.