![]() |
When should I use a library [solved] - 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: When should I use a library [solved] (/showthread.php?tid=29280) |
When should I use a library [solved] - El Forum - 04-04-2010 [eluser]katimari[/eluser] Hi everyone - I'm only a week into working with CodeIgniter and have a pretty basic question. I have a controller that has some functions that I want to be accessible through a URL and some functions that I do not want to be accessible to the public. Should I be creating a library for the functions I don't want the public to access or is there a better way to handle this? Thanks for your help! When should I use a library [solved] - El Forum - 04-04-2010 [eluser]Mischievous[/eluser] Normally I use libraries when I don't need to access to any CI resources to get the job done. Otherwise I run with a model. But I believe I would keep all the functions or "thinking" to a model and just let the controller hand off the request to a model and then retrieve it and send it to a view. \/------------------- Controller -> Model ^ \/ View When should I use a library [solved] - El Forum - 04-05-2010 [eluser]adamp1[/eluser] Please read this section of the userguide for details on private controller functions. http://ellislab.com/codeigniter/user-guide/general/controllers.html#private When should I use a library [solved] - El Forum - 04-05-2010 [eluser]laralaya[/eluser] thanks for the nice information When should I use a library [solved] - El Forum - 04-05-2010 [eluser]katimari[/eluser] Thanks Adam - that is exactly the info I was looking for! |