Skip to content

Commit

Permalink
[WebBundle] added a Response parameter to the send() method
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Apr 24, 2010
1 parent b508913 commit 9cf78e6
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/Symfony/Framework/WebBundle/Controller.php
Expand Up @@ -3,6 +3,7 @@
namespace Symfony\Framework\WebBundle;

use Symfony\Components\DependencyInjection\ContainerInterface;
use Symfony\Components\RequestHandler\Response;

/*
* This file is part of the Symfony framework.
Expand Down Expand Up @@ -96,14 +97,19 @@ public function renderView($view, array $parameters = array())
/**
* Renders a view.
*
* @param string $view The view name
* @param array $parameters An array of parameters to pass to the view
* @param string $view The view name
* @param array $parameters An array of parameters to pass to the view
* @param Response $response A response instance
*
* @return Response A Response instance
*/
public function render($view, array $parameters = array())
public function render($view, array $parameters = array(), Response $response = null)
{
$response = $this->container->getResponseService();
if (null === $response)
{
$response = $this->container->getResponseService();
}

$response->setContent($this->container->getTemplatingService()->render($view, $parameters));

return $response;
Expand Down

0 comments on commit 9cf78e6

Please sign in to comment.