BaseCCodeModel::class2id PHP Method

class2id() public method

For example, 'PostTag' will be converted as 'post-tag'.
public class2id ( string $name ) : string
$name string the string to be converted
return string the resulting ID
    public function class2id($name)
    {
        return trim(strtolower(str_replace('_', '-', preg_replace('/(?<![A-Z])[A-Z]/', '-\\0', $name))), '-');
    }