Welcome Guest, Not a member yet? Register   Sign In
Why doesn't CodeIgniter declare its variables?
#1

[eluser]Bjørn Børresen[/eluser]
Here's a snippet from CI_Base:

Code:
class CI_Base extends CI_Loader {

    function CI_Base()
    {
        // This allows syntax like $this->load->foo() to work
        parent::CI_Loader();
        $this->load =& $this;
        
        // This allows resources used within controller constructors to work
        global $OBJ;
        $OBJ = $this->load; // Do NOT use a reference.
    }
}

In the constructor $this->load is set, but why isn't the variable declared?

I'm trying to get auto-completion to work, and declared variables would help.


Messages In This Thread
Why doesn't CodeIgniter declare its variables? - by El Forum - 01-10-2010, 09:50 AM
Why doesn't CodeIgniter declare its variables? - by El Forum - 01-10-2010, 10:24 PM
Why doesn't CodeIgniter declare its variables? - by El Forum - 01-11-2010, 12:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB