public getLoop ( ) : React\EventLoop\LoopInterface | ||
리턴 | React\EventLoop\LoopInterface |
public function getLoop()
{
if (!$this->loop) {
$this->loop = \React\EventLoop\Factory::create();
}
return $this->loop;
}
/** * Creates instance of Phergie React Client and binds events */ public function __construct() { $this->client = new Client(); $this->timers = new Timers($this->client->getLoop()); $binder = new EventBinder(); $binder->bind($this->client, $this); }