PHP Class FOF30\Utils\StringHelper

Mostra file Open project: akeeba/fof Class Usage Examples

Public Methods

Method 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 method

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
return string The converted string

toBool() public static method

Convert a string to a boolean.
public static toBool ( string $string ) : boolean
$string string The string.
return boolean The converted string

toSlug() public static method

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
return string The slug