[eluser]Abel A.[/eluser]
I think I found a bug: You can't load a view outside the CI_Controller class. Example:
Code:
class Core {
public $CI;
public function __construct()
{
$this->CI =& get_instance();
}
public function msg($msg)
{
$this->CI->load->helper('url');
//if (strlen($msg->location) > 1) header("Refresh:3;url=".base_url().$msg->location);
$assgin_data = array("msg"=>$msg);
$this->CI->load->view('pos_msg',$assgin_data);
exit;
}
}
In theory when $this->core->msg($msg) is called within a controller, the view should be loaded from the msg function. Is this a bug? or am I using CI improperly?