Libraries and config files. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Libraries and config files. (/showthread.php?tid=10842) |
Libraries and config files. - El Forum - 08-14-2008 [eluser]Adam Griffiths[/eluser] Hey guys, I am in the middle of writing an authentication library, and I have a config file set up for it. The only problem I have is that I don't know how to access the variables. I've seen on the forum people mentioning about an initialize() function, do I need one? What does it need to do? I have also seen in the Loader.php file... Code: function _ci_init_class($class, $prefix = '', $config = FALSE) I guess from that I don't need to load the config file...but how would I access the config items in there? I'm new to writing libraries, so if this sounds really dopey, it's just because I'm starting out Thanks! Libraries and config files. - El Forum - 08-14-2008 [eluser]m4rw3r[/eluser] Seems like you get it as the first parameter to your constructor. |