[wp-trac] [WordPress Trac] #6821: ImageMagick support

WordPress Trac wp-trac at lists.automattic.com
Thu Oct 4 22:31:45 UTC 2012


#6821: ImageMagick support
-------------------------------------+-----------------------
 Reporter:  matt                     |       Owner:
     Type:  task (blessed)           |      Status:  assigned
 Priority:  normal                   |   Milestone:  3.5
Component:  Upload                   |     Version:  2.5
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |
-------------------------------------+-----------------------

Comment (by nacin):

 [22119] just means that non-static methods will get called in a static
 context.

 As far as I can tell, both test() and supports_mime_type() should indeed
 be static methods. We just need to remove them from the base class, as
 they are unused there.

 If we decide there is a set of specific methods an editor class must have
 (test() and supports_mime_type() obviously being two of them), then the
 base class should implement an interface.

 We also need to figure out what happens if we ever want to add a method.
 It seems to me like the current API would not allow for that. What if
 get_instance() takes a second parameter that can be an array of method
 names, and all method names must exist for the class to be returned?
 Obviously we would not be able to add a method to the interface or as an
 abstract method to the base class, because that would cause fatal errors.
 They would be frozen in time. Fun times.

 With regards to what this was based on, WP_Http, we won't need to add
 another "method" there. It's simple — we send an HTTP request. But I could
 absolutely see other image editing operations we might want to add in the
 future.

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


More information about the wp-trac mailing list