Phergie\Irc\Client\React\Client::getLoop PHP Метод

getLoop() публичный Метод

Returns the event loop dependency, initializing it if needed.
public getLoop ( ) : React\EventLoop\LoopInterface
Результат React\EventLoop\LoopInterface
    public function getLoop()
    {
        if (!$this->loop) {
            $this->loop = \React\EventLoop\Factory::create();
        }
        return $this->loop;
    }

Usage Example

Пример #1
0
 /**
  * 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);
 }
All Usage Examples Of Phergie\Irc\Client\React\Client::getLoop