Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Conflicts using __get() method to automatically load models #3137
I was trying to add the __get() method to my main controller, so that I don't need anymore to call the $this->load->model() each time I call for a model, here's the code :
It works fine but generates some conflicts with Code Igniter internals :
It seems the __get method don't really like the pass-by reference syntax...
Everything works fine. So my question is :
Do this part of code could be proposed as a pull request ?
It is not obsolete, just not functionally required for working with objects in the general case. It does however improve memory usage and
Anyway, I doubt that this error can be triggered by
Well, the only errors occuring comes from Codeigniter core. And that's because of pass-by references to unseted properties. Like this line :
It seems to be more a php concern than a Code Igniter one, though.
So my question still remains :