src/elnebuloso/Flex/Converter/PathToNamespaceClassname.php
public function convert($string)
    {
        $stringToCamelCase = new StringToCamelCase();
        $parts = [];

        foreach (explode('/', trim($string, '/')) as $part) {
            $parts[] = ucfirst($stringToCamelCase->convert($part, '-'));
        }

        return implode('\\', $parts);
    }
public function convert($string)
    {
        $stringToCamelCase = new StringToCamelCase();
        $parts = [];

        foreach (explode('/', trim($string, '/')) as $part) {
            $parts[] = ucfirst($stringToCamelCase->convert($part, '-'));
        }

        return implode('\\', $parts);
    }
convert path to namespaced classname

@param string $string
@return string