protected function wildCardMatch($source, $pattern)
    {
        $pattern = preg_quote($pattern, '#');

        $pattern = str_replace('\?' , '.?', $pattern);
        $pattern = str_replace('\*' , '.*?', $pattern);

        return (bool) preg_match('#^' . $pattern . '$#i' , $source);
    }