Welcome Guest, Not a member yet? Register   Sign In
DB inside Library
#4

[eluser]jwindhorst[/eluser]
I was doing something very similar when I came across this post and though I would add my own 2 cents.

Adding in the instance of the CI object this way, makes all that CI nonsense spit out when you print_r, or var_dump the library object. I find this to be mildly annoying, and so I've decided to instantiate the CI object inside each method:
Code:
function load_assets()
{
    $ci=& get_instance();
}

After seeing this post however, I'm wondering about performance. I could deal with the annoyance of having the extra info in the object, if there were a performance boost to doing it that way.

Anyone out there so good in CI that they can explain to me the performance benefits of using one method over the other?

Thanks


Messages In This Thread
DB inside Library - by El Forum - 08-12-2008, 02:59 PM
DB inside Library - by El Forum - 08-12-2008, 04:15 PM
DB inside Library - by El Forum - 08-12-2008, 04:54 PM
DB inside Library - by El Forum - 12-23-2008, 10:43 AM



Theme © iAndrew 2016 - Forum software by © MyBB