Returns the event loop dependency, initializing it if needed.
public getLoop ( ) : React\EventLoop\LoopInterface | ||
return | React\EventLoop\LoopInterface |
/** * 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); }
/** * Tests getLoop(). */ public function testGetLoop() { $this->assertInstanceOf('\\React\\EventLoop\\LoopInterface', $this->client->getLoop()); }