Is there a way to reassign $this?

ArTanGeL

New Member
First of all, I do not want to extend a class. I would ideally like to do this.\[code\]public function __construct() { /* Set Framework Variable */ global $Five; $this =& $Five;}\[/code\]I have a system where the variable $Five is a container class which contains other libraries. I could assign this to a local variable of Five... i.e.\[code\]public function __construct() { /* Set Framework Variable */ global $Five; $this->Five = $Five;}\[/code\]However, the reason why I am trying to avoid this is that function calls would be getting a little long.\[code\]$this->Five->load->library('library_name');\[/code\]Its a little ugly. Far better would be.\[code\]$this->load->library('library_name');\[/code\]What is the best solution for this?
 
Back
Top