[wp-trac] [WordPress Trac] #16764: PHP5-port - wpdb class

WordPress Trac wp-trac at lists.automattic.com
Tue Mar 8 23:46:04 UTC 2011


#16764: PHP5-port - wpdb class
-------------------------+-----------------------------
 Reporter:  hakre        |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  lowest       |   Milestone:  Future Release
Component:  Database     |     Version:  3.1
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+-----------------------------
Changes (by hakre):

 * type:  feature request => enhancement


Comment:

 I beg your pardon westi, wpdb is one of the classes that get's replaced
 more often. This can benefit from visiblity and interface. It's not
 introducing a different paradigm at least the changes suggested here were
 not intended to do so.

 The opposite is the case, it's a try to only do minimal changes so that
 overall code can benefit without introducing too much new things, e.g. a
 factory for wpdb or similar. The ticket here is just a very lightweight
 refactoring suggestion.

 However, you're totally right that PHP 5 is backwards comptabile with
 classes that do not make use of interfaces and visibility. The downside
 is, that you can only program against concrete classes and all methods and
 members are public.

 Wpdb has been designed with private members in mind and thanks to PHP 5,
 that paradigm can now be reflected even in code and not only in
 documentation. That's far away from a feature request.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16764#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list