[wp-trac] [WordPress Trac] #18476: Duplicate code in filesystem classes

WordPress Trac wp-trac at lists.automattic.com
Fri Jul 6 14:09:04 UTC 2012


#18476: Duplicate code in filesystem classes
--------------------------+------------------------------
 Reporter:  kurtpayne     |       Owner:  kurtpayne
     Type:  enhancement   |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Filesystem    |     Version:  3.2.1
 Severity:  minor         |  Resolution:
 Keywords:  dev-feedback  |
--------------------------+------------------------------

Comment (by dd32):

 As he who wrote the classes in question:
 * The Direct class was written first, and thus is the most fleshed out
 (without thought as to what methods would be supported over FTP)
 * The FTP Sockets class was written second
 * The FTP Extension class attempts to mimick the Sockets class
 * The Base class had any methods common to both FTP libraries thrown into
 it.

 The classes are not exactly standardised, I've wanted to (on many
 occasions) rip out all the "useless" methods and functionality which core
 doesn't use, or isn't implemented in all of them (For example, chown()
 can't be done via FTP, therefor, the abstraction shouldn't have a method
 for it on any of them).

 I like the idea of using the Direct class as the defacto "goto place" for
 docs, but feel they should all be documented individually, But I don't see
 the need to have stubs in the baseclass - It's not a PHP5 Interface, and
 if all subclasses are documented correctly, there's little need for it
 IMHO

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


More information about the wp-trac mailing list