private function setUrlService(Di $di, Config $config, $name)
    {
        $base   = $static = '/';
        if (isset($config['url'])) {
            $default = isset($config['url']['default']) ? $config['url']['default'] : '/';
            if (isset($config['url'][$name])) {
                $base   = isset($config['url'][$name]['uri']) ? $config['url'][$name]['uri'] : $default;
                $static = isset($config['url'][$name]['static']) ? $config['url'][$name]['static'] : $default;
            }
        }
        
        $url = new UrlService();
        $url->setBaseUri($base);
        $url->setStaticBaseUri($static);
        $di->set('url', $url, true);
        return $this;
    }