protected function url_to_class_name($url) {
        $bits = parse_url($url);
        $class = str_replace('.', '-', $bits['host']);
        if (!empty($bits['port'])) {
            $class .= '--' . $bits['port'];
        }
        if (!empty($bits['path'])) {
            $path = trim($bits['path'], '/');
            if ($path) {
                $class .= '--' . str_replace('/', '-', $path);
            }
        }
        return $class;
    }
protected function url_to_class_name($url) {
        $bits = parse_url($url);
        $class = str_replace('.', '-', $bits['host']);
        if (!empty($bits['port'])) {
            $class .= '--' . $bits['port'];
        }
        if (!empty($bits['path'])) {
            $path = trim($bits['path'], '/');
            if ($path) {
                $class .= '--' . str_replace('/', '-', $path);
            }
        }
        return $class;
    }
protected function url_to_class_name ( $ url ) { $ bits = parse_url ( $ url ) ; $ class = str_replace ( '.' , '-' , $ bits [ 'host' ] ) ; if ( ! empty ( $ bits [ 'port' ] ) ) { $ class .= '--' . $ bits [ 'port' ] ; } if ( ! empty ( $ bits [ 'path' ] ) ) { $ path = trim ( $ bits [ 'path' ] , '/' ) ; if ( $ path ) { $ class .= '--' . str_replace ( '/' , '-' , $ path ) ; } } return $ class ; }
Converts the provided URL into a CSS class that be used within the page.
This is primarily used to add the wwwroot to the body tag as a CSS class.

@param string $url
@return string
Converts the provided URL into a CSS class that be used within the page . This is primarily used to add the wwwroot to the body tag as a CSS class .