helpers\BaseInflector camel2id()

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

doc_Yii
2016-10-30 17:05:22
Comments
Leave a Comment

Please login to continue.