public function generate($name, array $parameters = array(), $absolute = false)
    {
        if (!$this->initialized) {
            $this->initialize();
        }

        $path = $this->routes[$name];
        if (is_array($path)) {
            $params = $path['params'];
            $path = $path['path'];

            foreach ($params as $param) {
                if (!isset($parameters[$param])) {
                    throw new \RuntimeException('Missing required parameter "'.$param.'". Optional parameters not currently supported');
                }

                $path = str_replace('{'.$param.'}', $parameters[$param], $path);
            }
        }

        if ($this->request) {
            $path = $this->request->getBaseUrl().$path;

            if ($absolute) {
                $path = $this->request->getSchemeAndHttpHost().$path;
            }
        }

        return $path;
    }