mirror of
https://github.com/getgrav/grav.git
synced 2026-05-07 05:05:50 +02:00
added onShutdown event that fires after the connection has been closed (background processing)
This commit is contained in:
@@ -215,8 +215,18 @@ class Grav extends Container
|
||||
*/
|
||||
public function shutdown()
|
||||
{
|
||||
set_time_limit(0);
|
||||
ignore_user_abort(true);
|
||||
|
||||
header('Content-length: ' . ob_get_length());
|
||||
header("Connection: close\r\n");
|
||||
|
||||
ob_end_flush();
|
||||
ob_flush();
|
||||
flush();
|
||||
|
||||
session_write_close();
|
||||
|
||||
$this->fireEvent('onShutdown');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user