Hi, guys.
First, thanks all for your work, it is awesome.
I don't know if the title is enough explicit.
I hope you will not hate me and that will not break something on your
code about this.
This came to me yesterday when I coded. As codes are better than
litteral expressions (for me), I will illustrate you what I have in
mind.
So:
// Fabien walks on a street
$fabien = new User('Fabien');
// Fabien see a stone on the ground with some thing under it.
// Fabien takes the stone, get 1 euro piece ( the beginning of
fortune ;) )
$takenstone = $fabien->takes(new Stone());
// Fabien says to the stone to send itself away.
$takenstone->send();
Now, what I think:
// I walk on a street
$blue_eyes = new User('blue_eyes');
// I see a stone on the ground with some thing under it.
// I take the stone, get 1 euro piece ( the beginning of fortune ;) )
$takenstone= $blue_eyes->takes(new Stone());
// I send the stone away.
$blue_eyes->send($takenstone);
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);
As you can see in the actual code, $response is sent itself.
What I purpose is the response is sent by the kernel.
So, I think actions in Response class like send(), sendHeaders() and
sendContent() should be moved in Kernel class.
I hope my explaination is rather clear to make the change if there is
needed.
Bye
--
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