Welcome Guest, Not a member yet? Register   Sign In
Extending dbutil
#1

[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.
#2

[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.
#3

[eluser]WanWizard[/eluser]
Currently, the database classes are not extendable.

But, the loader class is. Extend it, and overload the dbutil() method.
#4

[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.




Theme © iAndrew 2016 - Forum software by © MyBB