public function registerHandler($name, $type, $callback, $priority = 500)
{
if (empty($name) || empty($type) || !is_callable($callback, true)) {
return false;
}
$this->registrations[$name][$type][] = [self::REG_KEY_PRIORITY => $priority, self::REG_KEY_INDEX => $this->next_index, self::REG_KEY_HANDLER => $callback];
$this->next_index++;
return true;
}