camel2id() public static method
Converts a CamelCase name into an ID in lowercase.
Words in the ID may be concatenated using the specified character (defaults to '-'). For example, 'PostTag' will be converted to 'post-tag'.
public static string camel2id ( $name, $separator = '-', $strict = false ) | ||
---|---|---|
$name | string |
The string to be converted |
$separator | string |
The character used to concatenate the words in the ID |
$strict | boolean|string |
Whether to insert a separator between two consecutive uppercase chars, defaults to false |
return | string |
The resulting ID |
Please login to continue.