Welcome Guest, Not a member yet? Register   Sign In
Global form validation callbacks? Staged forms?
#5

[eluser]WanWizard[/eluser]
That is the generic downside of using a framework. There is some 'magic' going on in the background.

How you organize things is entirely up to you. Some people use a single index method (or even a _remap method), and then use a large if/switch structure to process all the different paths the control flow can take. Some prefer to split it into different methods, and either use _remap() as dispatcher or call the methods from the URI. It leads to more segmented code, which is easier to maintain in the future. In your example. 'whatever' would become the method name, which means the control stucture you now have in the index method to process the 'whatever' value is no longer needed. Same for the routes.

MY_Form_validation exends Form_validation I presume? And the constructor of MY_Form_validation calls it's parent constructor?


Messages In This Thread
Global form validation callbacks? Staged forms? - by El Forum - 09-03-2010, 01:35 PM
Global form validation callbacks? Staged forms? - by El Forum - 09-04-2010, 04:23 AM
Global form validation callbacks? Staged forms? - by El Forum - 09-04-2010, 04:51 AM
Global form validation callbacks? Staged forms? - by El Forum - 09-04-2010, 06:35 AM
Global form validation callbacks? Staged forms? - by El Forum - 09-04-2010, 07:22 AM
Global form validation callbacks? Staged forms? - by El Forum - 09-04-2010, 08:21 AM
Global form validation callbacks? Staged forms? - by El Forum - 09-04-2010, 10:25 AM
Global form validation callbacks? Staged forms? - by El Forum - 09-04-2010, 12:21 PM
Global form validation callbacks? Staged forms? - by El Forum - 09-04-2010, 12:38 PM
Global form validation callbacks? Staged forms? - by El Forum - 09-04-2010, 04:32 PM



Theme © iAndrew 2016 - Forum software by © MyBB