I have two controllers , and I have one object.
I want to pass that object between my two controllers in CodeIgniter.
There is a registry or something like that??
Example -
I am using ipbwi (for invision power board 3.1 integration ) ,
on my main controller I am doing this -
private $ipbwi;
function Main()
{
parent::Controller();
$this->site_url = $this->config->item('base_url');
$this->ipb_dir = $this->config->item('ipb_dir');
include('ipbwi/ipbwi.inc.php');
$this->ipbwi = clone $ipbwi;
}
I want to access $ipbwi from my admin controller and don`t clone this object again.
By passing object , I mean that I can create object add Controller A and access it from Controller B.
FIXED
I used the session class to check if the user is connected or not and if he is admin.