Welcome Guest, Not a member yet? Register   Sign In
Easier access to objects ($this->object instead of $this->CI->object)
#3

[eluser]Aken[/eluser]
The initialize() function needs to be __construct() - there's nothing that will automatically call initialize(). Other than that, it's a good trick - I've used similar styles, but I don't like autoloading default libraries like that, so I just did an __autoload() instead.

NeoArc, you could create an __autoload() with appropriate code to check for all locations for the requested class, but overall CodeIgniter isn't built to work that way. Maybe you'd prefer a different framework.


Messages In This Thread
Easier access to objects ($this->object instead of $this->CI->object) - by El Forum - 03-05-2012, 11:54 PM



Theme © iAndrew 2016 - Forum software by © MyBB