Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
core_shutdown_manager Class Reference

Shutdown management class. More...

Static Public Member Functions

static initialize ()
 Register self as main shutdown handler.
 
static register_function ($callback, array $params=null)
 Register custom shutdown function.
 
static register_signal_handler ($callback, array $params=null)
 Register custom signal handler function.
 
static shutdown_handler ()
 
  • do NOT call directly.

 
static signal_handler (int $signo)
 Signal handler for SIGINT, and SIGTERM.
 

Static Protected Member Functions

static request_shutdown ()
 Standard shutdown sequence.
 

Static Protected Attributes

static array $callbacks = []
 list of custom callbacks
 
static bool $registered = false
 is this manager already registered?
 
static array $signalcallbacks = []
 list of custom signal callbacks
 

Detailed Description

Shutdown management class.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ initialize()

static core_shutdown_manager::initialize ( )
static

Register self as main shutdown handler.

to be called from lib/setup.php only!

◆ register_function()

static core_shutdown_manager::register_function ( $callback,
array $params = null )
static

Register custom shutdown function.

Parameters
callable$callback
array$params
Return values
void

◆ register_signal_handler()

static core_shutdown_manager::register_signal_handler ( $callback,
array $params = null )
static

Register custom signal handler function.

If a handler returns false the signal will be ignored.

Parameters
callable$callback
array$params
Return values
void

◆ signal_handler()

static core_shutdown_manager::signal_handler ( int $signo)
static

Signal handler for SIGINT, and SIGTERM.

Parameters
int$signoThe signal being handled

The documentation for this class was generated from the following file: