/** * Returns an event subtype corresponding to a given event object, used to * generate event names when emitting events. * * @param \Phergie\Irc\Event\EventInterface $event * @return string */ protected function getEventSubtype(EventInterface $event) { $subevent = ''; if ($event instanceof CtcpEvent) { $subevent = 'ctcp.' . strtolower($event->getCtcpCommand()); } elseif ($event instanceof UserEvent) { $subevent = strtolower($event->getCommand()); } elseif ($event instanceof ServerEvent) { $subevent = strtolower($event->getCode()); } return $subevent; }
public function getCommand() { return $this->event->getCommand(); }