[wp-trac] [WordPress Trac] #18510: Class properties dbpassword, dbname, dbhost and dbh are undefined in wpdb

WordPress Trac wp-trac at lists.automattic.com
Wed Aug 8 20:31:55 UTC 2012


#18510: Class properties dbpassword, dbname, dbhost and dbh are undefined in wpdb
------------------------------------+-----------------------
 Reporter:  joelhardi               |       Owner:  nacin
     Type:  enhancement             |      Status:  reopened
 Priority:  normal                  |   Milestone:  3.5
Component:  Database                |     Version:  3.3
 Severity:  minor                   |  Resolution:
 Keywords:  dev-feedback has-patch  |
------------------------------------+-----------------------
Changes (by nacin):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 I chatted about this with pento after [21473] landed.

 I think it is really nice to declare things as protected so people know
 what is protected, and then expose them (as necessary from a pre-protected
 standpoint) with `__get()`. But this also means we should probably expose
 them with `__set(), `__unset()`, and `__isset()`.

 I do think that declaring things as protected and including these magic
 methods outweighs "var" and no magic methods.

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


More information about the wp-trac mailing list