No subject
Wed Aug 17 18:42:36 UTC 2011
"It is possible to replace this class with your own
by setting the $wpdb global variable in wp-content/db.php
file to your class. The wpdb class will still be included,
so you can extend it or simply use your own."
When one implements a db class that does not extend wpdb, it would be
safer that the new class implements an interface. This interface may be
called wpdb_compat and would assure that the class has all necessary
methods/properties. Of course, wpdb_compat should be supported by wpdb
too.
[Design Strategies]
My patch adds:
* wp-includes/interfaces/wpdb-compat.php
Very small edits to:
* wp-includes/wp-db.php
* wp-includes/load.php
* wp-admin/install.php
At the moment, WordPress does not include any interface; this means that
there is not a directory for interfaces.
In my first draft, I put it in wp-includes/interfaces so that - if more
interfaces will be added in the future - they will have a logical place.
[patch]
I have a patch which works correctly, but it seems that I can not post it
in Your Trac. How can I submit my patch to Your attention?
Federico Razzoli
More information about the wp-hackers
mailing list