Re: [chamilo-dev] autoload

2011-05-17 Thread Laurent Opprecht
Just did that. I updated a few autoloaders - admin, common, repo - to test. I will let owner of each plugin decide if they want to have a go. Normally if you run the script at the root this will update all repos. Le 16.05.2011 17:11, Philippe Van Eerdenbrugghe a écrit : If your script works wel

Re: [chamilo-dev] autoload

2011-05-16 Thread Philippe Van Eerdenbrugghe
If your script works well you can maybe add its functionality to the script/chamilo.php file maybe something like php script/chamilo.php generate-autoloader path/to/package [optional_name_of_the_generated_file = autoloader.php] Systho Le 16/05/2011 14:12, Sven Vanpoucke a écrit : Hi I noti

Re: [chamilo-dev] autoload

2011-05-16 Thread Sven Vanpoucke
Hi I noticed you already did this for the chamilo core. Be aware that we sometimes have factory methods which call / require classes dynamically. I've seen some of these classes into your mapper and i think the mapper can be more lightweight if these classes are not included. Best regards Sv

Re: [chamilo-dev] autoload

2011-05-13 Thread Sven Vanpoucke
We already have some scripts somewhere in common libraries that scan a file for it's class name so this shouldn't be a problem to create a mapper file. Van: "Laurent Opprecht" Aan: dev@lists.chamilo.org Verzonden: Vrijdag 13 mei 2011 16:54:03 Onderwerp: Re: [chamilo

Re: [chamilo-dev] autoload

2011-05-13 Thread Laurent Opprecht
For that I would parse the file's content and extract the class name from there- instead of relying on the file name. I was kind of hopping that when using an object cache autoloading would not be called that often. But would be happy to hear confirmation about that. As for spl can we regiser on

Re: [chamilo-dev] autoload

2011-05-13 Thread Philippe Van Eerdenbrugghe
There might be problem if the class name doesn't match the filename (like mdb2.php ) I'd like to go a little further on that topic and ask if anybody sees a problem if an optional app registers its own classloader on the spl stack ? (given it is appended and not prepended of course) Systho.