public function getCallbacksByType($type) { if (array_key_exists($type, $this->callbacks) && count($this->callbacks[$type]) > 0) { return $this->callbacks[$type]; } return []; }