Welcome Guest, Not a member yet? Register   Sign In
Proper place to load libraries
#4

[eluser]Phil Sturgeon[/eluser]
There is no single correct place to load a library.

Autoload if you need it EVERYWHERE.
Controller __construct() if you need it in every method of that controller
Controller method() if you only need it in a few methods here and there.

I also like to load libraries from other libraries if they require the. A lot of old C++ developers around here get angry about that, but I think loading dependent libraries wherever they are needed makes sense, especially as CI will only include and instantiate the classes once.


Messages In This Thread
Proper place to load libraries - by El Forum - 01-29-2009, 01:21 AM
Proper place to load libraries - by El Forum - 01-29-2009, 01:36 AM
Proper place to load libraries - by El Forum - 01-29-2009, 03:26 AM
Proper place to load libraries - by El Forum - 01-29-2009, 03:36 AM
Proper place to load libraries - by El Forum - 01-29-2009, 10:56 AM



Theme © iAndrew 2016 - Forum software by © MyBB