[eluser]a2s2[/eluser]
I'm trying to create a library that deals with authorization and permission.
I want to put this library into my /system folder so all my applications can benefit from it.
This library should access the database, to save new users or to retrieve then. Since /system folder does not have a /model sub-folder inside I cannot use a model inside my library, i.e., I cannot call $this->load->model('User_Model') inside my library class. Actually, it is not a matter of having /model inside /system, because the Loader class uses APPPATH to load models. So, in order to load a model within a library class I should extend the original Loader class to look into BASEPATH when loading models.
Is there a way to accomplish what I'm trying to do? I do not want to put User_Model inside the /application/models folder since I think the library should be self-contained, i.e., everything should exist into the /system folder so I can use the library with all applications without having to put the model into every /application/models directory.
I know I can access the database directly from within my library class, but since I'm using a framework that offers some goodies why can't I use it (the goodies) within my library?
Thanks in advance for any ideas or suggestions.