PHP Class FOF30\Utils\StringHelper

Afficher le fichier Open project: akeeba/fof Class Usage Examples

Méthodes publiques

Méthode Description
toASCII ( string $value ) : string Convert common northern European languages' letters into plain ASCII. This is a rudimentary transliteration.
toBool ( string $string ) : boolean Convert a string to a boolean.
toSlug ( string $value ) : string Convert a string into a slug (alias), suitable for use in URLs. Please note that transliteration support is rudimentary at this stage.

Method Details

toASCII() public static méthode

Convert common northern European languages' letters into plain ASCII. This is a rudimentary transliteration.
Deprecation: 3.0 Use JFactory::getLanguage()->transliterate instead
public static toASCII ( string $value ) : string
$value string The value to convert to ASCII
Résultat string The converted string

toBool() public static méthode

Convert a string to a boolean.
public static toBool ( string $string ) : boolean
$string string The string.
Résultat boolean The converted string

toSlug() public static méthode

Convert a string into a slug (alias), suitable for use in URLs. Please note that transliteration support is rudimentary at this stage.
Deprecation: 3.0 Use \JApplicationHelper::stringURLSafe instead
public static toSlug ( string $value ) : string
$value string A string to convert to slug
Résultat string The slug