Load a model and get the object |
[eluser]Unknown[/eluser]
Hi, I'm using Netbeans with CI and I found this really annoying: when loading a model: Code: $this->load->model('some_model'); In Netbeans CTRL+Space shows a list of available, but when I do Code: $this->some_model->CTRL+Space If I want the list I have to do Code: $Some_var = new Some_moddel(); Thank you
[eluser]TheFuzzy0ne[/eluser]
I'm not entirely sure, to be honest. Netbeans tries to intelligently guess what methods belong to what objects, but I think CodeIgniter confuses it. With: Code: $some_var = new Some_model(); Netbeans knows exactly what that variable contains, and knows what methods are available for that object. However, CodeIgniter uses a loader, and I don't think Netbeans knows when a model is loaded, or even if it has been loaded. This might help: http://ellislab.com/forums/viewthread/187949/ You may be able to add your models as properties. Code: /** |
Welcome Guest, Not a member yet? Register Sign In |