protected function normalizeUrl($url)
    {
        if (substr($url, 0, 1) != '/')
            $url = '/'.$url;

        if (!strlen($url))
            $url = '/';

        return $url;
    }
protected function normalizeUrl($url)
    {
        if (substr($url, 0, 1) != '/')
            $url = '/'.$url;

        if (!strlen($url))
            $url = '/';

        return $url;
    }
protected function normalizeUrl ( $ url ) { if ( substr ( $ url , 0 , 1 ) != '/' ) $ url = '/' . $ url ; if ( ! strlen ( $ url ) ) $ url = '/' ; return $ url ; }
Adds leading slash from a URL.

@param string $url URL to normalize.

@return string Returns normalized URL.
Adds leading slash from a URL .