[wp-trac] [WordPress Trac] #15032: WP_Object_Query

WordPress Trac wp-trac at lists.automattic.com
Mon Oct 4 19:41:42 UTC 2010


#15032: WP_Object_Query
-------------------------+--------------------------------------------------
 Reporter:  scribu       |       Owner:  scribu   
     Type:  enhancement  |      Status:  accepted 
 Priority:  normal       |   Milestone:  3.1      
Component:  General      |     Version:           
 Severity:  normal       |    Keywords:  has-patch
-------------------------+--------------------------------------------------

Comment(by filosofo):

 Replying to [ticket:15032 scribu]:
 > There's a lot of overlap between WP_Query and WP_User_Query.
 >
 > It would be good if they both inherited from a general WP_Object_Query,
 which would handle taxonomy and meta queries.

 I don't understand the point of the inheritance here.  Usually,
 inheritance involves substantial properties or behavior to be inherited;
 here, `WP_Object_Query` has two (private) methods and a property.  There's
 nothing to speak of being inherited; there's no expected re-use of the
 private methods for any given object; its code re-use could easily be done
 with a couple of functions.

 Also, the name is misleading.  Both of `WP_Object_Query`'s methods and its
 one property have to do with the object's ''meta'' information, not the
 object proper.

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


More information about the wp-trac mailing list