PHP Класс Microweber\Providers\URLify

Handles symbols from Latin languages, Greek, Turkish, Russian, Ukrainian, Czech, Polish, and Latvian. Symbols it cannot transliterate it will simply omit. Usage: echo URLify::filter (' J\'étudie le français '); "jetudie-le-francais" echo URLify::filter ('Lo siento, no hablo español.'); "lo-siento-no-hablo-espanol"
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$maps
$remove_list List of words to remove from URLs.

Открытые методы

Метод Описание
add_chars ( $map ) Add new characters to the list.
downcode ( $text ) Transliterates characters to their ASCII equivalents.
filter ( $text, $length = 60 ) Filters a string, e.g., "Petty theft" to "petty-theft".
remove_words ( $words ) Append words to the remove list.
transliterate ( $text ) Alias of URLify::downcode().

Приватные методы

Метод Описание
init ( ) Initializes the character map.

Описание методов

add_chars() публичный статический Метод

$map should be a hash.
public static add_chars ( $map )

downcode() публичный статический Метод

Transliterates characters to their ASCII equivalents.
public static downcode ( $text )

filter() публичный статический Метод

Filters a string, e.g., "Petty theft" to "petty-theft".
public static filter ( $text, $length = 60 )

remove_words() публичный статический Метод

Accepts either single words or an array of words.
public static remove_words ( $words )

transliterate() публичный статический Метод

Alias of URLify::downcode().
public static transliterate ( $text )

Описание свойств

$maps публичное статическое свойство

public static $maps

$remove_list публичное статическое свойство

List of words to remove from URLs.
public static $remove_list