yii\helpers\BaseInflector::id2camel PHP Method

id2camel() public static method

Words in the ID separated by $separator (defaults to '-') will be concatenated into a CamelCase name. For example, 'post-tag' is converted to 'PostTag'.
public static id2camel ( string $id, string $separator = '-' ) : string
$id string the ID to be converted
$separator string the character used to separate the words in the ID
return string the resulting CamelCase name
    public static function id2camel($id, $separator = '-')
    {
        return str_replace(' ', '', ucwords(implode(' ', explode($separator, $id))));
    }