Welcome Guest, Not a member yet? Register   Sign In
Oobleck - A patterned approach to dealing with forms and databases in CI controllers
#11

[eluser]webthink[/eluser]
The additional values functions just allow you to add any fields that don't get translated directly from the form. You create them on a per table per action basis and they'll get called by the library function fill_table_from_form automatically. So if i'm creating a record in my profiles table I'll call fill_table_from_form ('profile',CREATE); Which will then look for the function _set_additional_values_profile_create() in your controller and *if it exists* it will append the array returned to the values from the form.
#12

[eluser]Michael Wales[/eluser]
I just wanted to pop-in and say thanks for the mention. I'm glad you liked ErkanaAuth enough to not use it - that's the great thing about it!

I've only given Oobleck a cursory look, not enough to provide a valid comment, but if xwero is impressed I am sure I will be as well. I'll definitely give it a more thoughtful review this evening.
#13

[eluser]nmweb[/eluser]
Great work. CodeIgniter was really in need of something to integrate forms, validation and databases. I'd personally opt for in-model validation as it seems to often be the right place to put it. All data needs to pass the model at some point so having validation follows DRY. Nevertheless, really nice library. This is a problem everyone encounters at some point and the solution you bring up is good.




Theme © iAndrew 2016 - Forum software by © MyBB