Welcome Guest, Not a member yet? Register   Sign In
post_controller_constructor get_instance issues
#1

[eluser]i_like_ponies[/eluser]
Hi, so I've looked around this site and others and I was trying to figure out how to dynamically turn on profiling based on remote user IP.

So I found some great examples about using the post_controller_constructor and then setting the enable_profiler via the hook (using a config flag).

So the issue I've been running into constantly is that the get_instance always returns a NULL. I looked into hacking it to use the globals out of curiosity but they don't seem to be part of the constructor class.

http://codeigniter.com/wiki/Customizing_the_Profiler/

That tutorial looks like it should work, but everything I've tried so far never gets me a $CI object. Any thoughts? Everything I've read says that get_instance should work in this hook and later for the processing of the request, but that doesn't seem to be true. And I wanted to setup the environment for the requests before the methods on my controller get hit.

I'd give code examples but I've been using the ones from the site to test with and so far none have worked.


Messages In This Thread
post_controller_constructor get_instance issues - by El Forum - 03-22-2009, 05:25 PM
post_controller_constructor get_instance issues - by El Forum - 03-22-2009, 06:04 PM
post_controller_constructor get_instance issues - by El Forum - 03-22-2009, 06:22 PM
post_controller_constructor get_instance issues - by El Forum - 03-22-2009, 06:41 PM
post_controller_constructor get_instance issues - by El Forum - 03-23-2009, 12:03 AM



Theme © iAndrew 2016 - Forum software by © MyBB