aboutcoders/process-control
最新稳定版本:1.3.2
Composer 安装命令:
composer require aboutcoders/process-control
包简介
A PHP process control library
README 文档
README
A PHP process control library.
The interface
The ControllerInterface defines the method doExit() that indicates whether to exist a process.
interface ControllerInterface { /** * Indicates whether to exit a process * * @return boolean */ public function doExit(); }
The PcntlController
The PcntlController listens to PCNTL events to determine whether to exit a process.
$stopsignals = array(SIGTERM); $logger = new Psr\Log\NullLogger(); $controller = new PcntlController($stopsignals, $logger); while(!$controller->doExit()) { // do something }
The ChainController
The ChainController executes multiple controllers in a chain to determine whether to exit a process.
The NullController
The NullController never indicates to exit a process.
Note: This controller can be used as fallback controller for the PcntlController in runtime environments where PCNTL functions to not exist.
统计信息
- 总下载量: 23.79k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 1
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-04-04