You still have to define each field in the form component that will be used to bind data to the object, there is no magic plumbing.
t On Mon, Nov 22, 2010 at 09:30, Gustavo Adrian <[email protected]>wrote: > I thought on separate the setting field by field from my first example to > another simple class, so I encapsulate that functionality. Setting the > fields by hand on the controller means a lot of code if I'm using an entity > with lots of fields and, if I change my schema, I'd have to change again the > code on the controller accordingly. > > I don't know how the bind functionality from the Form Component works but I > guess is what I'm trying to do here. I just want to do the binding without > the other Form stuff. > > Is that possible? if that's not an option, what would be the better way of > doing this? > > > > Thanks! > > > On Sun, Nov 21, 2010 at 5:17 PM, Bernhard Schussek <[email protected]>wrote: > >> 2010/11/21 Gustavo Adrian <[email protected]>: >> > I was thinking on delegating the data binding to a separated component >> just >> > for convenience to make possible this: >> > >> > $dataBinder = new DataBinder( $myObject, $validator ); >> > $dataBinder->bind( $data ); >> >> NO. This makes your data immensely vulnerable - how do you restrict >> $data to only contain certain keys? >> >> Bernhard >> -- >> Software Architect & Engineer >> Blog: http://webmozarts.com >> Twitter: http://twitter.com/webmozart >> >> -- >> 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]<symfony-users%[email protected]> >> For more options, visit this group at >> http://groups.google.com/group/symfony-users?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 users" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected]<symfony-users%[email protected]> > For more options, visit this group at > http://groups.google.com/group/symfony-users?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 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
