Welcome Guest, Not a member yet? Register   Sign In
Access model inside library?
#1

[eluser]Unknown[/eluser]
I've been coding PHP for six years, but am relatively new to OO and CI.

I'm wanting to access model methods inside a library. I have my controller loading model M1 and library L1 (just an example).

How can I access M1->some_method() inside L1? I don't know how to load/access the model inside the library, as the library is clearly not a controller.

I apologize if this is just "Doh!" simple. Please enlighten me...

Thanks a bunch.
#2

[eluser]verynewtothis[/eluser]
CI User Guide on libraries

you'll find this "Utilizing CodeIgniter Resources within Your Library".. i assume accessing models should not be any different...




Theme © iAndrew 2016 - Forum software by © MyBB