Welcome Guest, Not a member yet? Register   Sign In
OO usage in code igniter structure, Model, Controller
#4

[eluser]m4rw3r[/eluser]
Umm, "new" is a keyword, use create or something instead.

Colin's example is a good complement to what I wrote above, and shows how the model can handle the creation/insertion of data objects.

btw, another reason to have the Cat class is to let it have methods that otherwise would have ended up in a helper (which would be suitable in many cases, depends on how it would be used).


Messages In This Thread
OO usage in code igniter structure, Model, Controller - by El Forum - 11-14-2008, 04:07 PM
OO usage in code igniter structure, Model, Controller - by El Forum - 11-15-2008, 02:14 PM
OO usage in code igniter structure, Model, Controller - by El Forum - 11-15-2008, 04:33 PM
OO usage in code igniter structure, Model, Controller - by El Forum - 11-15-2008, 04:41 PM
OO usage in code igniter structure, Model, Controller - by El Forum - 11-15-2008, 05:28 PM
OO usage in code igniter structure, Model, Controller - by El Forum - 11-15-2008, 06:14 PM
OO usage in code igniter structure, Model, Controller - by El Forum - 11-15-2008, 07:25 PM



Theme © iAndrew 2016 - Forum software by © MyBB