Terje Slettebø wrote : > I think this sounds like a great idea. :) We do something similar with our > class loader, in > that it scans a lib-directory and its subfolders, building a map of class > name to filename > (it doesn't open the files - it only builds the map based on file naming > convention, allowing > it to infer the class name from the file name, if a file contains a class) > and storing it in > the session. Yet, something that didn't have to be rebuild at session startup > would be even > better. > > Of course, one could serialise this information, but then it becomes > important that it > updates it when there are relevant file changes (like your CLI program can > do).
I don't know if it is a great idea because you are the only one to be interested. Please feel free to download and use it (http://www.tekwire.net/joomla/component/option,com_docman/task,cat_view/gid,32/Itemid,47/). I would be glad to know that I am not the only one to use it in the world :-). I try to find time to write a small documentation but it is quite easy to use as there are only 3 files (Autoload.php is the runtime include, loading a map file uses Autoload::load(), Autoload_Builder.php is the CLI map builder and it has a '-h' flag to display its syntax). Until I write the doc, you will have to use it the PEAR way :-) (WYGIWYG, what you get is what you get). May I say that, on this subject and others, I am quite disappointed by the attitude of people on this mailing list. I tried to get some reactions about two projects I had been working on during several months (the Autoload handler and the PHK manager) and the few ones I got were mostly of the let-us-alone-and-keep-your-f..-ideas-for-you sort... It looks like you are the only one to understand that the process of getting the classes through corresponding filenames is quite primitive and can be improved. Even in the Zend framework, they implemented this stone-aged handler. Maybe it is normal because the list is regularly polluted by newbies who think they have solutions for everything when they have been working with PHP for 10 mins. That's why I have proposed to start a more formal RFC-like process where people who have really worked on a subject could propose changes and enhancements. This would eliminate the buzz of newbies and it would also provide a place to keep an history of proposals and decisions. It would also allow to implement a clean place for polls, instead of the poor process we saw during the last days about the filter extension. But, for this proposal like others, I didn't have any reply... Actually, I really think that, on this list, when you do not belong to a group of about 10-15 gurus, everything you say is systematically rejected. It is sad for PHP because (I'll get flames for this) this attitude is generally considered as an early characteristic of organizations on the decline. I am sorry to say that but I certainly won't waste more time with this list. Regards Francois -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php