public function getEventsOfType($type) { $events = array(); foreach ($this->events as $event) { if ($event->getType() == $type) { $events[] = $event; } } return $events; }
/** * Gets the events added to the handler by the plugin * @param string $type * @return array | null */ public function getResponseEvents($type = null) { if (is_string($type) && strlen($type) > 0) { return $this->handler->getEventsOfType($type); } return $this->handler->getEvents(); }