| 1 | <?php |
||
| 13 | class ReactRunner implements RunnerInterface |
||
| 14 | { |
||
| 15 | 1 | public static function create() :ReactRunner |
|
| 22 | |||
| 23 | /** @var LoopInterface */ |
||
| 24 | private $loop; |
||
| 25 | /** @var int */ |
||
| 26 | private $loopTimeout = 2; |
||
| 27 | /** @var int */ |
||
| 28 | private $loopCounter = 0; |
||
| 29 | |||
| 30 | |||
| 31 | /** |
||
| 32 | * @param \React\EventLoop\LoopInterface |
||
| 33 | * @param \React\HttpClient\Client |
||
| 34 | */ |
||
| 35 | 4 | public function __construct(LoopInterface $loop) |
|
| 39 | |||
| 40 | 1 | public function setLoopTimeout(int $timeout) |
|
| 44 | |||
| 45 | /** |
||
| 46 | * @param BotInterface |
||
| 47 | * @param integer $maxTimesToPoll |
||
| 48 | */ |
||
| 49 | 2 | public function runBot(BotInterface $bot, $maxTimesToPoll = null) |
|
| 65 | } |
||
| 66 |