Welcome Guest, Not a member yet? Register   Sign In
get_instance() in pre_controller hook?
#10

[eluser]vitoco[/eluser]
from what i see on core/Codeigniter.php the following code check if there's a cache_override hook

Code:
// Line ~193
if ($EXT->_call_hook('cache_override') === FALSE)

and as insitefx said, still not available the $CI object, but this classes are initialized ( that later will be assigned to $CI, and can be called like $this->class )
Code:
$EXT =& load_class('Hooks', 'core');
$CFG =& load_class('Config', 'core');
$UNI =& load_class('Utf8', 'core');
$URI =& load_class('URI', 'core');
$RTR =& load_class('Router', 'core');
$OUT =& load_class('Output', 'core');

so you can access them with

Code:
//core/Common.php
// function &load;_class($class, $directory = 'libraries', $prefix = 'CI_') ;
$RTR = &load;_class('Router');

and use it as any other object ( or as if there were part of $this->class )

Slds


Messages In This Thread
get_instance() in pre_controller hook? - by El Forum - 02-04-2011, 12:10 PM
get_instance() in pre_controller hook? - by El Forum - 02-04-2011, 09:14 PM
get_instance() in pre_controller hook? - by El Forum - 02-04-2011, 10:20 PM
get_instance() in pre_controller hook? - by El Forum - 02-05-2011, 07:10 AM
get_instance() in pre_controller hook? - by El Forum - 02-05-2011, 09:32 AM
get_instance() in pre_controller hook? - by El Forum - 01-23-2013, 04:06 PM
get_instance() in pre_controller hook? - by El Forum - 01-23-2013, 04:17 PM
get_instance() in pre_controller hook? - by El Forum - 01-23-2013, 05:44 PM
get_instance() in pre_controller hook? - by El Forum - 01-23-2013, 07:10 PM
get_instance() in pre_controller hook? - by El Forum - 01-23-2013, 07:21 PM
get_instance() in pre_controller hook? - by El Forum - 01-24-2013, 01:51 AM
get_instance() in pre_controller hook? - by El Forum - 02-01-2013, 04:26 AM



Theme © iAndrew 2016 - Forum software by © MyBB