Working with packages |
[eluser]Bramme[/eluser]
Hi guys I'm working on some code in CI I'd like to reuse in the future. After reading the docs and finding out about "packages" (http://ellislab.com/codeigniter/user-gui...oader.html) I thought it'd be interesting to bundle my reusable code in a package, but I find the docs a little lacking here and came across some problems. I put my libraries, config files, views, core/MY_Controller and default controllers in a folder in the third_party folder. I'm autoloading the package and the libraries are working, though I'm stumbling across some problems: - I'm using Colin Williams' template library, but the config file isn't loading, neither are the views. I am not certain this is a CI or Template library problem. - I got a 404 and had to put my default controller back in application/controller instead of application/third_party/app/controllers - I'm overwriting CI_Controller with MY_Controller in application/core. I was hoping I could move this to the package as well, but no luck. Are these problems that are easily fixable? Or am I trying to do something packages were not intended for?
[eluser]guillermo, out of repose[/eluser]
I'm trying to work through some of the same problems, so I'll offer what I've found: - It doesn't look like config files from a package are loaded if those files exist in your application folder. - As far as I can tell, core classes aren't supported in the packages implementation. That's something I'm currently wrestling with myself. It'd be pretty handy, though.
[eluser]coldscooter[/eluser]
I'm also finding the same problem. I can load libraries, helpers and models fine, but the config files are not loading. The main one i want in the package is the database settings as I have two apps with the same database.php in each. Any feedback or solutions would be much appreciated. |
Welcome Guest, Not a member yet? Register Sign In |