From: Gianluca S. <gi...@gm...> - 2009-05-17 09:36:42
|
On Mon, May 4, 2009 at 6:33 PM, Paul Richards <pa...@ma...> wrote: > For 3rd party libraries, we're going to have to do something special: > > For PHPMailer class, it's in a file called class.phpmailer.php (Note: lowercase) > For RSSBuilder class, it's in a file called class.RSSBuilder.inc.php (note addition of .inc. and mixed case) > For nusoap_client class, it's in a file called class.soapclient.php (note name doesn't even match). > > Yes, we could move all libraries into an include path /library, but we'd still need the switch statement, unless we start renaming classes/filenames of libraries, which i'm guessing we dont want to do. Yes, surely we don't want to rename 3rd party stuff, but I don't see adding a switch case in the autoload function to treat each class name as a special one a really good thing to do. I think all 3rd party stuff should be loaded explicitly, while our classes should follow the same pattern to offer autoload functionality with a single/simpler logic. And since I really hate to talk about stuff without doing any actual work to back my points, I took some time to start the move, as you can see from my latest push. IMHO this is the first step toward a better organization of the codebase, so feel free to have a look and point out stuff I'd eventually broke. Best regards G. -- Gianluca Sforna http://morefedora.blogspot.com http://www.linkedin.com/in/gianlucasforna |