Welcome Guest, Not a member yet? Register   Sign In
What do you do with your config arrays?
#4

[eluser]Crimp[/eluser]
I put the arrays for validation in private functions at the bottom of the controller. This practice cuts down on the amount of smaller helpers and configs and keeps the controller code minimal for easier reading. Instead of long arrasy, the controller method gets one line:

Code:
$this->_form_validation($action);

If the same form view is used for insert/update actions, I pass in an $action varriable and set the fields accordingly, if any changes are needed, in the private function.


Messages In This Thread
What do you do with your config arrays? - by El Forum - 07-16-2008, 09:53 AM
What do you do with your config arrays? - by El Forum - 07-17-2008, 05:37 AM
What do you do with your config arrays? - by El Forum - 07-17-2008, 05:41 AM
What do you do with your config arrays? - by El Forum - 07-17-2008, 05:50 AM
What do you do with your config arrays? - by El Forum - 07-17-2008, 06:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB