07-01-2008, 02:39 AM
[eluser]Dave Stewart[/eluser]
I've tried this, and it appears not to work. Is this the case?
Cheers,
Dave
I've tried this, and it appears not to work. Is this the case?
Cheers,
Dave
Libraries in subfolders
|
07-01-2008, 02:39 AM
[eluser]Dave Stewart[/eluser]
I've tried this, and it appears not to work. Is this the case? Cheers, Dave
07-01-2008, 02:59 AM
[eluser]xwero[/eluser]
There are contributions to patch this. So you are right it doesn't work maybe the load->model path code snippet should be made into a function and put into the codeigniter/common.php file to make it available for all loaded files to use Code: last_mile_path($path)
07-01-2008, 06:18 AM
[eluser]Dave Stewart[/eluser]
I'm sure if there were collisions in names, CI coudl also warn you, or ask you to specify a different name when loading the library, ie: Code: $->this->load->library('nav/navigation','nav'); As it is, I'll cope without.
07-01-2008, 07:17 AM
[eluser]xwero[/eluser]
Good remark i'm going to keep it in mind. I'm busy coming up with code to remove the hardcoded paths and the function i added above gives developers a greater flexibility putting CI related files.
07-01-2008, 07:42 AM
[eluser]Dave Stewart[/eluser]
Sounds useful. xwero, are you one of CI's core developers?
07-01-2008, 07:46 AM
[eluser]xwero[/eluser]
No i'm a developer with a short attention span ![]() ![]()
07-01-2008, 07:51 AM
[eluser]Dave Stewart[/eluser]
[quote author="xwero" date="1214937978"]No i'm a developer with a short attention span ![]() Gotcha! I think that would cover me as well - it's certainly rewarding to aim for elegance. Are you extending the CI_Loader class then?
07-01-2008, 07:59 AM
[eluser]xwero[/eluser]
At the moment i've made a MY_Common.php and a MY_Loader.php file for testing purposes. i'm going to release them soon. I'm already testing it at the moment on a site in development.
07-14-2008, 09:59 AM
[eluser]codex[/eluser]
[quote author="xwero" date="1214936259"]Good remark i'm going to keep it in mind. I'm busy coming up with code to remove the hardcoded paths and the function i added above gives developers a greater flexibility putting CI related files.[/quote] Does this by any chance mean you're modifying the loader in a way that it will allow you to put files anywhere you want? Thus making it possible to move shared libraries/helpers into a 'shared resources' folder? I saw you had a feature request asking for just that. Would be pretty handy. EDIT: this thread http://ellislab.com/forums/viewthread/75217/ |