protected function getClassname($name)
    {
        $result = implode(' ', explode('/', $name));
        $result = implode(' ', explode('-', $result));

        $result = ucwords($result);

        // replace non letter or digits by empty string
        $result = preg_replace('/[^\\pL\d]+/u', '', $result);

        // trim
        $result = trim($result, '-');

        // transliterate
        $result = iconv('UTF-8', 'US-ASCII//TRANSLIT', $result);

        // remove unwanted characters
        $result = preg_replace('/[^-\w]+/', '', $result);

        return $result;
    }
protected function getClassname($name)
    {
        $result = implode(' ', explode('/', $name));
        $result = implode(' ', explode('-', $result));

        $result = ucwords($result);

        // replace non letter or digits by empty string
        $result = preg_replace('/[^\\pL\d]+/u', '', $result);

        // trim
        $result = trim($result, '-');

        // transliterate
        $result = iconv('UTF-8', 'US-ASCII//TRANSLIT', $result);

        // remove unwanted characters
        $result = preg_replace('/[^-\w]+/', '', $result);

        return $result;
    }
protected function getClassname ( $ name ) { $ result = implode ( ' ' , explode ( '/' , $ name ) ) ; $ result = implode ( ' ' , explode ( '-' , $ result ) ) ; $ result = ucwords ( $ result ) ; // replace non letter or digits by empty string $ result = preg_replace ( '/[^\\pL\d]+/u' , '' , $ result ) ; // trim $ result = trim ( $ result , '-' ) ; // transliterate $ result = iconv ( 'UTF-8' , 'US-ASCII//TRANSLIT' , $ result ) ; // remove unwanted characters $ result = preg_replace ( '/[^-\w]+/' , '' , $ result ) ; return $ result ; }
Gets the classname.

@param string $name

@return string
Gets the classname .