In Codeigniter, get_instance()
is a globally available function that returns the Controller super-object which contains all the currently loaded classes (it ret
As far as I know, it's a matter of convenience more than anything. Chances are that you will be using the CI super object a lot in your libraries so why not assign it to a variable to make it a little easier to work with?
There are a few other things to consider...
get_instance()
every time you use the helper rather than storing its result in a variable.