Autoloaded libraries loading loads |
[eluser]MikePearce[/eluser]
Hi all, I'm having a bit of a problem. I'm using an auto loaded library and it calls an external service to grab some data in it's __construct(). Anyway, it would seem that codeigniter either loads, or instantiates the autoload clases several times as it boots up. If I add an mail() call to the library method in Loader.php: Code: /** I get 18 emails PER autoloaded library. Does anyone know why it is showing this behaviour? It's not limited to there either. If I add the call to a __destruct() in another library (say, the Output.php for example) it does the same thing. So, I guess it's not just auto loaded libraries. I've tried setting a flag within the $CI object so that it sets the flag on the first execution of the external call and then checks to see if the flag ISN'T set before calling it again, but it seems to ignore the flag and run the call 18 times anyway. I really hope someone can help because this is driving me batshit crazy!! Thanks in advance, Mike |
Messages In This Thread |
Autoloaded libraries loading loads - by El Forum - 02-01-2008, 11:07 AM
Autoloaded libraries loading loads - by El Forum - 02-04-2008, 01:44 AM
Autoloaded libraries loading loads - by El Forum - 02-04-2008, 02:06 AM
|