Phergie\Irc\Bot\React\Bot::run PHP Method

run() public method

Initiates an event loop for the bot in which it will connect to servers and monitor those connections for events to forward to plugins.
public run ( boolean $autorun = true )
$autorun boolean
    public function run($autorun = true)
    {
        $this->setDependencyOverrides($this->config);
        $this->getPlugins($this->config);
        $connections = $this->getConnections($this->config);
        $this->getClient()->run($connections, $autorun);
    }

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\Bot\React\Bot::run