Phergie\Irc\Client\React\Client::setLoop PHP Method

setLoop() public method

Sets the event loop dependency.
public setLoop ( React\EventLoop\LoopInterface $loop )
$loop React\EventLoop\LoopInterface
    public function setLoop(LoopInterface $loop)
    {
        $this->loop = $loop;
    }

Usage Example

 /**
  * @param ConstructEvent $event
  */
 public function construct(ConstructEvent $event)
 {
     $client = new Client();
     $client->setLoop($event->getLoop());
     $bot = new Bot();
     $bot->setConfig(Configure::read('WyriHaximus.Phergie.config'));
     $bot->setClient($client);
     $bot->run(false);
     EventManager::instance()->dispatch(StartEvent::create($event->getLoop(), $bot));
 }
All Usage Examples Of Phergie\Irc\Client\React\Client::setLoop