public function getClassName($name)
    {
        $name = $this->replaceDollar($name);
        $name = preg_replace_callback('#[/\{\}]+(\w)#', function ($matches) {
            return ucfirst($matches[1]);
        }, $name);
        $name = Inflector::classify($name);

        if (preg_match(self::BAD_CLASS_NAME_REGEX, $name)) {
            $name = '_'.$name;
        }

        return $name;
    }