public function convert($string)
    {
        $parts = [];

        foreach (explode('\\', trim($string, '\\')) as $name) {
            $name = strtolower(preg_replace('/([a-z])([A-Z])/', '$1-$2', $name));
            $parts[] = $name;
        }

        return implode('/', $parts);
    }
public function convert($string)
    {
        $parts = [];

        foreach (explode('\\', trim($string, '\\')) as $name) {
            $name = strtolower(preg_replace('/([a-z])([A-Z])/', '$1-$2', $name));
            $parts[] = $name;
        }

        return implode('/', $parts);
    }
public function convert ( $ string ) { $ parts = [ ] ; foreach ( explode ( '\\' , trim ( $ string , '\\' ) ) as $ name ) { $ name = strtolower ( preg_replace ( '/([a-z])([A-Z])/' , '$1-$2' , $ name ) ) ; $ parts [ ] = $ name ; } return implode ( '/' , $ parts ) ; }
convert namespaced classname to path

@param string $string
@return string
convert namespaced classname to path