src/IrcConnection.php
protected function dispatchEvent(\Erebot\Interfaces\Event\Base\Generic $event)
    {
        $logger = \Plop\Plop::getInstance();
        $logger->debug(
            $this->bot->gettext('Dispatching "%(type)s" event.'),
            array('type' => get_class($event))
        );
        try {
            foreach ($this->events as $handler) {
                if ($handler->handleEvent($event) === false) {
                    break;
                }
            }
        } catch (\Erebot\ErrorReportingException $e) {
            // This should help make the code a little more "bug-free" (TM).
            $logger->exception($this->bot->gettext('Code is not clean!'), $e);
            $this->disconnect($e->getMessage());
        }
    }
protected function dispatchEvent(\Erebot\Interfaces\Event\Base\Generic $event)
    {
        $logger = \Plop\Plop::getInstance();
        $logger->debug(
            $this->bot->gettext('Dispatching "%(type)s" event.'),
            array('type' => get_class($event))
        );
        try {
            foreach ($this->events as $handler) {
                if ($handler->handleEvent($event) === false) {
                    break;
                }
            }
        } catch (\Erebot\ErrorReportingException $e) {
            // This should help make the code a little more "bug-free" (TM).
            $logger->exception($this->bot->gettext('Code is not clean!'), $e);
            $this->disconnect($e->getMessage());
        }
    }
protected function dispatchEvent ( \ Erebot \ Interfaces \ Event \ Base \ Generic $ event ) { $ logger = \ Plop \ Plop :: getInstance ( ) ; $ logger -> debug ( $ this -> bot -> gettext ( 'Dispatching "%(type)s" event.' ) , array ( 'type' => get_class ( $ event ) ) ) ; try { foreach ( $ this -> events as $ handler ) { if ( $ handler -> handleEvent ( $ event ) === false ) { break ; } } } catch ( \ Erebot \ ErrorReportingException $ e ) { // This should help make the code a little more "bug-free" (TM). $ logger -> exception ( $ this -> bot -> gettext ( 'Code is not clean!' ) , $ e ) ; $ this -> disconnect ( $ e -> getMessage ( ) ) ; } }
Dispatches the given event to handlers
which have been registered for this type of event.

\param Erebot::Interfaces::Event::Base::Generic $event
An event to dispatch.
Dispatches the given event to handlers which have been registered for this type of event .