protected function handle(Handler $handler, Notification $notification)
    {
        try {
            $handler->handle($notification);
            $this->write("RESULT 2\nOK");
        } catch (EventHandlingFailed $e) {
            $this->write("RESULT 4\nFAIL");
        } catch (StopListener $e) {
            $this->listen = false;
        }
    }
protected function handle(Handler $handler, Notification $notification)
    {
        try {
            $handler->handle($notification);
            $this->write("RESULT 2\nOK");
        } catch (EventHandlingFailed $e) {
            $this->write("RESULT 4\nFAIL");
        } catch (StopListener $e) {
            $this->listen = false;
        }
    }
protected function handle ( Handler $ handler , Notification $ notification ) { try { $ handler -> handle ( $ notification ) ; $ this -> write ( "RESULT 2\nOK" ) ; } catch ( EventHandlingFailed $ e ) { $ this -> write ( "RESULT 4\nFAIL" ) ; } catch ( StopListener $ e ) { $ this -> listen = false ; } }
Handles the notification

@param Handler      $handler
@param Notification $notification
Handles the notification