thruster/process-exit-handler

1.0.0 2016-01-12 15:43 UTC

README

[Latest Version] (https://github.com/ThrusterIO/process-exit-handler/releases) [Software License] (LICENSE) [Build Status] (https://travis-ci.org/ThrusterIO/process-exit-handler) [Code Coverage] (https://scrutinizer-ci.com/g/ThrusterIO/process-exit-handler) [Quality Score] (https://scrutinizer-ci.com/g/ThrusterIO/process-exit-handler) [Total Downloads] (https://packagist.org/packages/thruster/process-exit-handler)

[Email] (mailto:team@thruster.io)

The Thruster ProcessExitHandler Component. Handles all sub-process exits

Install

Via Composer

$ composer require thruster/process-exit-handler

Usage

use Thruster\Component\EventLoop\EventLoop;
use Thruster\Component\ProcessExitHandler\ExitHandler;
use Thruster\Component\ProcessExitHandler\ExitEvent;

$loop = new EventLoop();
$exitHandler = new ExitHandler($loop);

$exitHandler->addHandler(function (ExitEvent $event) {
    // ... Handle event
});

$loop->run();

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CONDUCT for details.

License

Please see License File for more information.