[eluser]tonanbarbarian[/eluser]
Yes there are a few things that are loaded before the controller
Once the controller is loaded a reference is made to the input class inside the controller so that you can access it there
If you need to extend the input and you need to access the controller in it here is what I suggest
still keep your CI property but do not instantiate it in the constructor
create a seperate method that can check for an instantiate the CI property and call there in any new code that you write where you might need to access the controller.
This way you dont break the input class and you only use the CI property when you needed it saving resources
Code:
class MY_Input extends CI_Input {
var $CI = null;
function My_Input()
{
parent::CI_Input();
}
function _inst() {
if ($this->CI===null && function_exists('get_instance'))
$this->CI =& get_instance();
}
function something() {
$this->_inst();
...
}
}