Welcome Guest, Not a member yet? Register   Sign In
possible to use URI library in pre_controller hook?
#1

[eluser]the real rlee[/eluser]
Hi, this may be a silly question but is it possible to use the URI library in a pre_controller hook? I'm getting errors telling me the object doesnt exist, but the User Docs indicate that the URI class is pre-loaded with CI and pre_controller hooks are after everything CI is loaded... Am I missing something here? Appreciate any help Big Grin

Code:
$hook['pre_controller'] = array('class'=>'History', 'function'=>'update', 'filename'=>'History.php', 'filepath'=>'hooks', 'params'=>array());

And my hook:
Code:
class History {

var $CI;

function History(){
  $this->CI =& get_instance();
}

function update(){
  die($this->CI->uri->uri_string());
  $this->CI->session->set_userdata(array('location'=>$this->CI->uri->uri_string()));
}

}


Messages In This Thread
possible to use URI library in pre_controller hook? - by El Forum - 07-23-2007, 10:30 PM
possible to use URI library in pre_controller hook? - by El Forum - 07-24-2007, 05:37 PM
possible to use URI library in pre_controller hook? - by El Forum - 07-24-2007, 07:45 PM
possible to use URI library in pre_controller hook? - by El Forum - 07-24-2007, 08:26 PM
possible to use URI library in pre_controller hook? - by El Forum - 07-25-2007, 04:43 AM
possible to use URI library in pre_controller hook? - by El Forum - 08-26-2007, 11:45 PM
possible to use URI library in pre_controller hook? - by El Forum - 10-25-2007, 02:07 PM



Theme © iAndrew 2016 - Forum software by © MyBB