[wp-trac] [WordPress Trac] #12267: Upgrade loop objects to provide identical presentational interfaces.

WordPress Trac wp-trac at lists.automattic.com
Mon Feb 22 18:24:57 UTC 2010


#12267: Upgrade loop objects to provide identical presentational interfaces.
-------------------------+--------------------------------------------------
 Reporter:  andy         |       Owner:     
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  3.0
Component:  General      |     Version:     
 Severity:  normal       |    Keywords:     
-------------------------+--------------------------------------------------

Comment(by filosofo):

 Replying to [comment:10 hakre]:
 > Replying to [comment:7 filosofo]:
 > ...
 >
 > Regarding your last patch I suggest you keep WP_Object as prefix in all
 classes:
 >
 > {{{
 > class WP_Object_Page extends WP_Object_Post {
 > class WP_Object_Post extends WP_Object{
 > class WP_Object_Comment extends WP_Object {
 > }}}
 >

 hakre, I was thinking the same thing.

 Also, I was thinking that perhaps the factory method should return a
 WP_Object object with null properties, even if the object type isn't
 identified, to keep from throwing errors downstream.  What do you think?

 Also, I think the object type mapping should move to each object's
 constructor.

 It was a rough patch, but I wanted to put something up.

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


More information about the wp-trac mailing list