PHP code example of baraja-core / shutdown-terminator
1. Go to this page and download the library: Download baraja-core/shutdown-terminator library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
baraja-core / shutdown-terminator example snippets
class MyLogger implements \Baraja\ShutdownTerminator\TerminatorHandler
{
public function __construct()
{
// register this service to Terminator
Terminator::addHandler($this);
}
public function processTerminatorHandler(): void
{
// this logic will be called by Terminator.
}
}