protected static function extract($pattern)
    {
        if (str_contains($pattern, '|')) {
            $segements = explode('|', $pattern);

            $events[$segements[0]] = explode('.', $segements[1]);
        } else {
            $segements = explode('.', $pattern);

            $events[$segements[0]] = $segements[1];
        }

        return $events;
    }