protected function buildRequest(Route $route, $name = null, array $parameters = array())
    {
        if (null !== $name) {
            $uri = $this->router->generate($name, $parameters);
        } else {
            $uri = $route->getPath();
        }

        return new Request(
            [], // GET
            [], // POST
            [], // Attributes
            [], // Cookies
            [], // Files
            [
                'REQUEST_URI'     => $uri,
                'DOCUMENT_URI'    => $uri,
                'SCRIPT_FILENAME' => realpath($this->kernel->getRootDir().'/../web').$this->baseUrl.'/app.php',
                'SCRIPT_NAME'     => $this->baseUrl.'/app.php'
            ], // Server
            null // Content
        );
    }