public function build(Route $route, $name, array $parameters = [])
    {
        $url      = $this->app['url_generator']->generate($name, $parameters, UrlGeneratorInterface::ABSOLUTE_URL);
        $request  = Request::create($url, 'GET', array_merge(['_format' => $route->getFormat()], $parameters));
        $response = $this->app->handle($request);

        $this->write(
            $this->getFilePath($route, $parameters),
            $response->getContent(),
            $request->getFormat($response->headers->get('Content-Type')),
            $route->getFileName()
        );
    }
public function build(Route $route, $name, array $parameters = [])
    {
        $url      = $this->app['url_generator']->generate($name, $parameters, UrlGeneratorInterface::ABSOLUTE_URL);
        $request  = Request::create($url, 'GET', array_merge(['_format' => $route->getFormat()], $parameters));
        $response = $this->app->handle($request);

        $this->write(
            $this->getFilePath($route, $parameters),
            $response->getContent(),
            $request->getFormat($response->headers->get('Content-Type')),
            $route->getFileName()
        );
    }
public function build ( Route $ route , $ name , array $ parameters = [ ] ) { $ url = $ this -> app [ 'url_generator' ] -> generate ( $ name , $ parameters , UrlGeneratorInterface :: ABSOLUTE_URL ) ; $ request = Request :: create ( $ url , 'GET' , array_merge ( [ '_format' => $ route -> getFormat ( ) ] , $ parameters ) ) ; $ response = $ this -> app -> handle ( $ request ) ; $ this -> write ( $ this -> getFilePath ( $ route , $ parameters ) , $ response -> getContent ( ) , $ request -> getFormat ( $ response -> headers -> get ( 'Content-Type' ) ) , $ route -> getFileName ( ) ) ; }
Dump the given Route into a file

@param Route $route
@param string $name
@param array $parameters
Dump the given Route into a file