Extending dbutil - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Extending dbutil (/showthread.php?tid=32708) |
Extending dbutil - El Forum - 08-01-2010 [eluser]Militis[/eluser] I use the csv_from_result function of dbutil so a user can download a copy of our orders table. What I'd like to do is format and/or rename the headings. Normally, I'd just extend the class and go from there. Problem is, dbutil isn't in the libraries, helpers, or plugins system folders. Do I just need to add a "database" folder to my application folder to be able to extend the dbutil class? If this has already been answered somewhere else, please link me to it. I did a search but didn't find anything relevant. Extending dbutil - El Forum - 08-02-2010 [eluser]Militis[/eluser] Bump...Anyone have any ideas? I hate to just hack the core, because it makes upgrading difficult. If this isn't possible, I guess that's what I'll have to do. Extending dbutil - El Forum - 08-02-2010 [eluser]WanWizard[/eluser] Currently, the database classes are not extendable. But, the loader class is. Extend it, and overload the dbutil() method. Extending dbutil - El Forum - 08-03-2010 [eluser]Militis[/eluser] [quote author="WanWizard" date="1280832946"]Currently, the database classes are not extendable. But, the loader class is. Extend it, and overload the dbutil() method.[/quote] Alright, thanks. I guess the easiest way, in this case, would be to copy the csv function to one of my models/libraries and modify it. |