There is no need to worry about every outcome. Use elseif to cover all the
possibilities you care about and a final else to catch anything else or even
just end your action with a default function to perform if none of the
others are hit. Trying to build an action in ANY app by trying to cover
every eventuality is just begging for bugs.

In essence, code for what you expect and code once for everything else.

On 03 Jan 2011 8:06 AM, "Eric B" <[email protected]> wrote:

On Mon, Jan 3, 2011 at 12:45 AM, Richtermeister <[email protected]> wrote:
>
>
> You can do that. Jus...
Sure; that's what I ended up doing.  But that assumes a lot of things:
1) that the action will be a success
2) that the action will be a redirect
etc...

I guess I could somehow pass an array of all potential outcomes (although
arrays in parameters is not an obvious solution), and code the action to
check my possible outcomes, etc.  However, it would cause a duplication of a
lot of code in all the actions, unless I were to put it in the sfAction
super class, etc.

Was just a thought for an improvement to symfony.  Coming from a different
background I saw how useful it was.  I don't know if symfony users see the
need for it.



Thanks,

Eric

-- 
If you want to report a vulnerability issue on symfony, please send it to
secur...

-- 
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 users" 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-users?hl=en

Reply via email to