Kernel
class Kernel implements Kernel
Traits
Properties
| protected EventDispatcher|null | $symfonyDispatcher | The Symfony event dispatcher implementation. |
|
| protected Application|null | $artisan | ||
| 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 CarbonImmutable|null | $commandStartedAt | When the currently handled command started. |
|
| protected array | $bootstrappers | The console application bootstrappers. |
Methods
Get the number of seconds until the given DateTime.
Get the "available at" UNIX timestamp.
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 Hypervel 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.
Get the Finder instance for discovering command files.
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.
Runs the current application.
Details
in
InteractsWithTime at line 17
protected int
secondsUntil(DateInterval|DateTimeInterface|int $delay)
Get the number of seconds until the given DateTime.
in
InteractsWithTime at line 29
protected int
availableAt(DateInterval|DateTimeInterface|int|null $delay = 0)
Get the "available at" UNIX timestamp.
in
InteractsWithTime at line 41
protected DateTimeInterface|int
parseDateInterval(DateInterval|DateTimeInterface|int|null $delay)
If the given value is an interval, convert it to a DateTime instance.
in
InteractsWithTime at line 57
protected int
currentTime()
Get the current system time as a UNIX timestamp.
in
InteractsWithTime at line 65
protected string
runTimeForHumans(float $startTime, float|null $endTime = null)
Given a start time, format the total run time for human readability.
at line 104
__construct(Application $app, Dispatcher $events)
No description
at line 124
Kernel
rerouteSymfonyCommandEvents()
| internal |
Re-route the Symfony command events to their Hypervel counterparts.
at line 155
int
handle(InputInterface $input, OutputInterface|null $output = null)
Run the console application.
at line 180
void
terminate(InputInterface $input, int $status)
Terminate the application.
at line 228
void
whenCommandLifecycleIsLongerThan(CarbonInterval|DateTimeInterface|float|int $threshold, callable $handler)
Register a callback to be invoked when the command lifecycle duration exceeds a given amount of time.
at line 247
CarbonImmutable|null
commandStartedAt()
When the command being handled started.
at line 255
void
schedule(Schedule $schedule)
Define the application's command schedule.
at line 262
Schedule
resolveConsoleSchedule()
Resolve a console schedule instance.
at line 272
protected string|null
scheduleTimezone()
Get the timezone that should be used by default for scheduled events.
at line 282
protected string|null
scheduleCache()
Get the name of the cache store that should manage scheduling mutexes.
at line 292
void
commands()
Register the commands for the application.
at line 299
ClosureCommand
command(string $signature, Closure $callback)
Register a Closure based command with the application.
at line 315
void
load(array|string $paths)
Register all of the commands in the given directory.
at line 357
protected Finder
findCommands(array $paths)
Get the Finder instance for discovering command files.
at line 365
protected string
commandClassFromFile(SplFileInfo $file, string $namespace)
Extract the command class name from the given file path.
at line 377
void
registerCommand(Command $command)
Register the given command with the console application.
at line 387
int
call(string $command, array $parameters = [], OutputInterface|null $outputBuffer = null)
Run an Artisan console command by name.
at line 401
PendingDispatch
queue(string $command, array $parameters = [])
Queue the given console command.
at line 409
array
all()
Get all of the commands registered with the console.
at line 419
string
output()
Get the output for the last run command.
at line 429
void
bootstrap()
Bootstrap the application for artisan commands.
at line 449
protected void
discoverCommands()
Discover the commands that should be automatically loaded.
at line 465
void
bootstrapWithoutBootingProviders()
Bootstrap the application without booting service providers.
at line 477
protected bool
shouldDiscoverCommands()
Determine if the kernel should discover commands.
at line 485
Application
getArtisan()
Get the Artisan application instance.
at line 510
void
setArtisan(Application|null $artisan)
Set the Artisan application instance.
at line 518
Kernel
addCommands(array $commands)
Set the Artisan commands provided by the application.
at line 532
Kernel
addCommandPaths(array $paths)
Set the paths that should have their Artisan commands automatically discovered.
at line 542
Kernel
addCommandRoutePaths(array $paths)
Set the paths that should have their Artisan "routes" automatically discovered.
at line 552
protected array
bootstrappers()
Get the bootstrap classes for the application.
at line 560
protected void
reportException(Throwable $e)
Report the exception to the exception handler.
at line 568
protected void
renderException(OutputInterface $output, Throwable $e)
Render the given exception.
at line 584
int
run(InputInterface|null $input = null, OutputInterface|null $output = null)
Runs the current application.