Microweber\Providers\URLify::downcode PHP Method

downcode() public static method

Transliterates characters to their ASCII equivalents.
public static downcode ( $text )
    public static function downcode($text)
    {
        self::init();
        if (preg_match_all(self::$regex, $text, $matches)) {
            for ($i = 0; $i < count($matches[0]); ++$i) {
                $char = $matches[0][$i];
                if (isset(self::$map[$char])) {
                    $text = str_replace($char, self::$map[$char], $text);
                }
            }
        }
        return $text;
    }