[wp-trac] [WordPress Trac] #21309: Introduce WP_Post class

WordPress Trac wp-trac at lists.automattic.com
Thu Jul 26 15:09:55 UTC 2012


#21309: Introduce WP_Post class
----------------------------+------------------
 Reporter:  scribu          |       Owner:
     Type:  task (blessed)  |      Status:  new
 Priority:  normal          |   Milestone:  3.5
Component:  General         |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |
----------------------------+------------------

Comment (by scribu):

 > Can I suggest changing $post to 'protected' so a subclass can access it,

 You can have another decorator class instead, i.e. have a My_WP_Post class
 that contains a WP_Post instance, just like WP_Post contains an instance
 of a stdClass.

 > add @property PHPDoc comments so that we can get auto-complete in
 editors like PhpStorm

 Sure.

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


More information about the wp-trac mailing list