public static function getSlug($text, $separator = '-')
    {
        return strtolower(
            trim(
                preg_replace('~[^0-9a-z]+~i', '-', html_entity_decode(
                    preg_replace('~&([a-z]{1,2})(?:acute|cedil|circ|grave|lig|orn|ring|slash|th|tilde|uml);~i', '$1', htmlentities(
                        $text, ENT_QUOTES, 'UTF-8'
                    )
                ), ENT_QUOTES, 'UTF-8')
            ), $separator)
        );
    }