Welcome Guest, Not a member yet? Register   Sign In
How to load my classes whenever, wherever without having to include/require them
#6

[eluser]jonez[/eluser]
1) It can go anywhere that's autoloaded. Some people put it in a config file, others in the root index.php. It doesn't really matter as long as you remember where you put it, so when you do upgrade you can check to ensure it carries through.

2) If it's in a config file, as long as you don't overwrite that config file yes it will be preserved.

3) Personal opinion: Yes, don't use autoloading. Since CI doesn't autoload on it's own, and there's probably some code you wrote that loads using CI's normal methods, mixing how you load classes leads to messy unmaintainable code. If the framework autoloads go nuts, if it doesn't don't force it. Consistency is one of the most important aspects of managing a large code base.


Messages In This Thread
How to load my classes whenever, wherever without having to include/require them - by El Forum - 05-02-2014, 09:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB