protected function globNames(
        /*# string */ $eventName,
        array $names
    )/*# : array */ {
        $result = [];
        foreach ($names as $n) {
            if ($n === '*' || $n === $eventName || $eventName === '') {
                $result[] = $n;
            } elseif (strpos($n, '*') !== false) {
                $regex = str_replace(array('.', '*'), array('[.]', '.*?'), $n);
                if (preg_match('/^'.$regex.'$/', $eventName)) {
                    $result[] = $n;
                }
            }
        }
        return $result;
    }