protected function renderWithParameters(Route $route, $name = null, array $parameter = array())
    {
        $request = $this->buildRequest($route, $name, $parameter);

        $response = $this->kernel->handle($request);
        $content = $response->getContent();
        $this->kernel->terminate($request, $response);
        $this->kernel->shutdown();

        if (null !== $name) {
            $filename = $this->router->generate($name, $parameter);
        } else {
            $filename = $route->getPath();
        }

        $this->writer->write($filename, $content);
    }
protected function renderWithParameters(Route $route, $name = null, array $parameter = array())
    {
        $request = $this->buildRequest($route, $name, $parameter);

        $response = $this->kernel->handle($request);
        $content = $response->getContent();
        $this->kernel->terminate($request, $response);
        $this->kernel->shutdown();

        if (null !== $name) {
            $filename = $this->router->generate($name, $parameter);
        } else {
            $filename = $route->getPath();
        }

        $this->writer->write($filename, $content);
    }
protected function renderWithParameters ( Route $ route , $ name = null , array $ parameter = array ( ) ) { $ request = $ this -> buildRequest ( $ route , $ name , $ parameter ) ; $ response = $ this -> kernel -> handle ( $ request ) ; $ content = $ response -> getContent ( ) ; $ this -> kernel -> terminate ( $ request , $ response ) ; $ this -> kernel -> shutdown ( ) ; if ( null !== $ name ) { $ filename = $ this -> router -> generate ( $ name , $ parameter ) ; } else { $ filename = $ route -> getPath ( ) ; } $ this -> writer -> write ( $ filename , $ content ) ; }
Renders the given route with the given parameter.

@param Route  $route     Route.
@param string $name      Name of the route; the default value is `null`.
@param array  $parameter Array of parameters; the default value is an empty array.

@return void
Renders the given route with the given parameter .