I see what you mean now, that is indeed inconsistent.

How is removal of core.view helping there?

Sent from my Nexus One
On Feb 20, 2011 5:43 PM, "Lukas Kahwe Smith" <[email protected]> wrote:
>
> On 20.02.2011, at 23:35, Bulat Shakirzyanov wrote:
>
>> Lukas, I am not sure what you're asking, maybe a code example?
>
> if i get the framework extra properly to do a redirect you would still
need to make a Reponse instance, right?
>
> /**
> * @Route("/")
> * @Template
> */
> public function indexAction()
> {
> if ($foo) {
> return $this->redirect('..');
> }
> $posts = ...;
> return array('posts' => $posts);
> }
>
> $foo = true, then you would by pass the core.view, else you would use the
core.view to create the response, two radically different code paths to
build the response in a single controller action. furthermore, in one case
you have a central place deciding how things are processed and in the other
a local approach. this seems rather unclean.
>
> however you also loose flexibility to say that given the format (say xml)
you decide to not redirect and instead return the content directly (for
example because the redirect is only done to prevent multiple submissions in
a user browser which isnt relevant to a non browser request). the core.view
provides you with a certain level of flexibility to handle formats
differently, just as long as the returned variable isnt a Response.
>
> regards,
> Lukas Kahwe Smith
> [email protected]
>
>
>
> --
> 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

-- 
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