Welcome Guest, Not a member yet? Register   Sign In
loading a model from within a custom library or helper file
#4

[eluser]AtlantixMedia[/eluser]
Can anyone suggest the proper way to design this? I don't like the idea of putting model calls into a library. this is for a registration system.

1) Register Controller handles form inputs.
2) Validation custom library. I decided to create my own validation library as I have other custom validation criterias to test in addition to the basic ones provided by the standard CI validation library. in addition I prefer to keep everything in one place. among the several validation rules, there are two which need to check whether a username and/or email are already in the database. this is where the model is loaded and accessed.
3) Auth_Model Model. Handles queries relating to input validation, login, new member inserts and updates.

It would be great if I could keep all model loads and calls in the controllers, but then I would need to also have the 2 custom validation functions in there which is not what I would like to do.

any help would be greatly appreciated.

thanks


Messages In This Thread
loading a model from within a custom library or helper file - by El Forum - 12-15-2007, 05:09 PM



Theme © iAndrew 2016 - Forum software by © MyBB