Pionia Core

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
static

booting()

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
$this

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

        
On this page

Search results