public static function fileName($string, $ext = 'php', $capitalize = true) {
        if (mb_strpos($string, '.') !== false) {
            $string = mb_substr($string, 0, mb_strrpos($string, '.'));
        }

        $path = static::camelCase($string);

        if (!$capitalize) {
            $path = lcfirst($path);
        }

        if (mb_substr($path, -(mb_strlen($ext) + 1)) !== '.' . $ext) {
            $path .= '.' . $ext;
        }

        return $path;
    }
public static function fileName($string, $ext = 'php', $capitalize = true) {
        if (mb_strpos($string, '.') !== false) {
            $string = mb_substr($string, 0, mb_strrpos($string, '.'));
        }

        $path = static::camelCase($string);

        if (!$capitalize) {
            $path = lcfirst($path);
        }

        if (mb_substr($path, -(mb_strlen($ext) + 1)) !== '.' . $ext) {
            $path .= '.' . $ext;
        }

        return $path;
    }
public static function fileName ( $ string , $ ext = 'php' , $ capitalize = true ) { if ( mb_strpos ( $ string , '.' ) !== false ) { $ string = mb_substr ( $ string , 0 , mb_strrpos ( $ string , '.' ) ) ; } $ path = static :: camelCase ( $ string ) ; if ( ! $ capitalize ) { $ path = lcfirst ( $ path ) ; } if ( mb_substr ( $ path , - ( mb_strlen ( $ ext ) + 1 ) ) !== '.' . $ ext ) { $ path .= '.' . $ ext ; } return $ path ; }
Inflect a word for a filename. Studly cased and capitalized.

@param string $string
@param string $ext
@param bool $capitalize
@return string
Inflect a word for a filename . Studly cased and capitalized .