[wp-trac] [WordPress Trac] #31985: WP_Network class

WordPress Trac noreply at wordpress.org
Wed Oct 14 16:37:56 UTC 2015


#31985: WP_Network class
--------------------------------+-------------------------
 Reporter:  johnjamesjacoby     |       Owner:  jeremyfelt
     Type:  task (blessed)      |      Status:  accepted
 Priority:  normal              |   Milestone:  4.4
Component:  Networks and Sites  |     Version:  3.0
 Severity:  normal              |  Resolution:
 Keywords:  has-patch           |     Focuses:  multisite
--------------------------------+-------------------------
Changes (by jeremyfelt):

 * keywords:  dev-feedback has-patch => has-patch


Comment:

 Replying to [comment:46 toscho]:
 > Can we please use proper getters for the currently public properties and
 make the properties private? If anybody can change those at any time, the
 whole object becomes completely unreliable. This is not helpful. Also,
 this needs an interface, so we can use the class in dependency injection
 without a static dependency.

 We [https://wordpress.slack.com/archives/core-multisite/p1444768780000352
 talked about public vs private] a bit during yesterdays office hours.
 We're going to leave the properties as public. A couple reasons for this:

 * Most related objects in core have public properties. It's an expectation
 of sorts.
 * We're introducing this as the way to populate `$current_site`, which has
 assumed properties that have been stomped on for years. We risk breakage
 if we make those properties private all of a sudden.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31985#comment:49>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list