Welcome Guest, Not a member yet? Register   Sign In
Why can't I extend the database classes?
#1

[eluser]Scott Severance[/eluser]
I'm in the process of fixing a bug in several database classes (I haven't reported it yet as I still need to do a bit more work). I would like to be able to extend the various database classes and override the specific methods that I'm changing, in order to maintain cleaner code separation. However, I noticed that the manual says that I can't do this. Why not?
#2

[eluser]coolfactor[/eluser]
Because it's not (yet) supported. If you can figure out a way, I'm sure the community would be grateful.
#3

[eluser]Scott Severance[/eluser]
Is it, then, because of the complexity of the database classes, or is it simply because no one implemented such a thing?
#4

[eluser]coolfactor[/eluser]
[quote author="Scott Severance" date="1186307691"]Is it, then, because of the complexity of the database classes, or is it simply because no one implemented such a thing?[/quote]

Both, I think. The ability to extend classes/libraries was only added in a recent version of CodeIgniter, and the current design of the Database classes didn't make it possible to extend them.




Theme © iAndrew 2016 - Forum software by © MyBB