PHP Class 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"
显示文件
Open project: microweber/microweber
Public Properties
Public Methods
Method |
Description |
|
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(). |
|
Private Methods
Method |
Description |
|
init ( ) |
Initializes the character map. |
|
Method Details
add_chars()
public static method
downcode()
public static method
Transliterates characters to their ASCII equivalents.
filter()
public static method
Filters a string, e.g., "Petty theft" to "petty-theft".
public static filter ( $text, $length = 60 ) |
remove_words()
public static method
Accepts either single words
or an array of words.
transliterate()
public static method
Alias of URLify::downcode().
Property Details
$maps public_oe static_oe property
$remove_list public_oe static_oe property
List of words to remove from URLs.
public static $remove_list |