ProcessExitHandler Component
[
]
(https://github.com/ThrusterIO/process-exit-handler/releases)
[
]
(LICENSE)
[
]
(https://travis-ci.org/ThrusterIO/process-exit-handler)
[
]
(https://scrutinizer-ci.com/g/ThrusterIO/process-exit-handler)
[
]
(https://scrutinizer-ci.com/g/ThrusterIO/process-exit-handler)
[
]
(https://packagist.org/packages/thruster/process-exit-handler), (*1)
[
]
(mailto:team@thruster.io), (*2)
The Thruster ProcessExitHandler Component. Handles all sub-process exits, (*3)
Install
Via Composer, (*4)
``` bash
$ composer require thruster/process-exit-handler, (*5)
## Usage
```php
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
bash
$ composer test
, (*6)
Contributing
Please see CONTRIBUTING and CONDUCT for details., (*7)
License
Please see License File for more information., (*8)