ApplicationLifecycleHooks
Table of Contents
Methods
- booted() : static
- Register callbacks to be run after the application is booted This method can be called multiple times to add more hooks
- booting() : $this
- Register hooks to mutate the application booting cycle.
- shutdown() : void
- Shutdown the application
- terminate() : void
- Shutdown the application
- terminated() : void
- Register the application's terminated hook listeners.
- terminating() : void
- Register the application's terminating hooks.
- callBootedCallbacks() : void
- Run all booted callbacks
- callBootingCallbacks() : void
- Run all booting callbacks
- callTerminatedCallbacks() : void
- Run all terminated callbacks
- callTerminatingCallbacks() : void
- Run all terminating callbacks
Methods
booted()
Register callbacks to be run after the application is booted This method can be called multiple times to add more hooks
public
booted(Closure $closure) : static
Hooks here have access to the application instance
Parameters
- $closure : Closure
Return values
staticbooting()
Register hooks to mutate the application booting cycle.
public
booting(Closure $callback) : $this
Runs before the application is booted Can be called multiple times to add more hooks.
All hooks here do not have access to the application instance
Parameters
- $callback : Closure
Return values
$thisshutdown()
Shutdown the application
public
shutdown() : void
terminate()
Shutdown the application
public
terminate([int $status = 1 ]) : void
Parameters
- $status : int = 1
terminated()
Register the application's terminated hook listeners.
public
terminated(Closure $closure) : void
All logic that needs to run after the application is terminated Can be called multiple times to add more hooks
Hooks here do not have access to the application instance
Parameters
- $closure : Closure
terminating()
Register the application's terminating hooks.
public
terminating(Closure $callback) : void
All logic that needs to run before the application is terminated Can be called multiple times to add more hooks
Hooks here have access to the application instance
Parameters
- $callback : Closure
callBootedCallbacks()
Run all booted callbacks
private
callBootedCallbacks() : void
callBootingCallbacks()
Run all booting callbacks
private
callBootingCallbacks() : void
callTerminatedCallbacks()
Run all terminated callbacks
private
callTerminatedCallbacks() : void
callTerminatingCallbacks()
Run all terminating callbacks
private
callTerminatingCallbacks() : void