On 11/28/10 1:53 PM, Jordi Boggiano wrote:
On Sat, Nov 27, 2010 at 4:36 PM, Lukas Kahwe Smith<[email protected]>  wrote:
Now, translate this example with the HttpKernel component:

Actual code:
$kernel = new AppKernel('prod', false);
$kernel->handle(new Request())->send();

Future code:
$kernel = new AppKernel('prod', false);
$response = $kernel->handle(new Request());
$kernel->send($response);


just looking at the two above versions i agree i like the second one better.

I have to disagree here. You don't need a Kernel to send a response.
The last line could be $response->send() and still it'd be clear. The
clarity comes from expanding it in 3 lines imo, not from the fact that
the Kernel has a send() method added.

exactly. The Response should be decoupled from the Kernel. You should be able to send a Response without a Kernel.

Fabien

Cheers


--
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to