CodeIgniter Forums
passing data to model - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: passing data to model (/showthread.php?tid=16342)

Pages: 1 2


passing data to model - El Forum - 03-03-2009

[eluser]Colin Williams[/eluser]
Quote:Sure, but they don’t extract data directly from $this->input->post() do they? You actually pass it to them.

No, the controller passes it. As far as the model knows, it's just an array.


passing data to model - El Forum - 03-03-2009

[eluser]bigtimslim[/eluser]
Thanks for the great examples. I see what you guys mean now.


passing data to model - El Forum - 03-03-2009

[eluser]bigtimslim[/eluser]
By the way, JayTee, why is the underscore in front of the build_user function in your example? Does that denote the function is exclusive to this class?


Edit: you wrote private function, this must be the case Smile


passing data to model - El Forum - 03-03-2009

[eluser]TheFuzzy0ne[/eluser]
No, it denotes a private method that cannot be access via a URI. After all, you wouldn't want people running functions that aren't meant to be accessible by the user, would you? http://ellislab.com/codeigniter/user-guide/general/controllers.html#private


passing data to model - El Forum - 03-03-2009

[eluser]bigtimslim[/eluser]
I certainly wouldn't. Thanks.


passing data to model - El Forum - 03-03-2009

[eluser]Milos Dakic[/eluser]
This clears up a few things for me too! Great examples =]