+1 I second that. Chaining rules and there should be more of it.

Daniel


On Jul 1, 7:30 am, Georg <geor...@have2.com> wrote:
> Hello,
>
> I think that the bind() method of the Form object should return the
> object to make it possible to chain methods, for my personal use of
> forms, this would make sense:
>
> if ($request->isMethod('POST') &&
> $form->bind($request->getParameter('formvars'))->isValid()){
> ...
>
> } else {
> ...
> }
>
> Because now I have
> if ($request->isMethod('POST')){
>   $form->bind($request->getParameter('formvars'));
>   if ($form->isValid()){
>     ...
>   }
> // and now where to put the else?
>   else {
> //   here?
>   }
>
> }else {
> // or here?
> }
>
> What do you think?

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to