![]() |
Access model inside library? - 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: Access model inside library? (/showthread.php?tid=21564) |
Access model inside library? - El Forum - 08-13-2009 [eluser]Unknown[/eluser] I've been coding PHP for six years, but am relatively new to OO and CI. I'm wanting to access model methods inside a library. I have my controller loading model M1 and library L1 (just an example). How can I access M1->some_method() inside L1? I don't know how to load/access the model inside the library, as the library is clearly not a controller. I apologize if this is just "Doh!" simple. Please enlighten me... Thanks a bunch. Access model inside library? - El Forum - 08-13-2009 [eluser]verynewtothis[/eluser] CI User Guide on libraries you'll find this "Utilizing CodeIgniter Resources within Your Library".. i assume accessing models should not be any different... |