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
Sven
Op 13/05/11 16:54, Laurent Opprecht schreef:
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 one function to load several classes? I was
under the impression that each class had to be mapped.
If we have to register each class in global then the price may be
higher than the current implementation.
Le 13.05.2011 16:28, Philippe Van Eerdenbrugghe a écrit :
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.
Le 13/05/2011 15:06, Laurent Opprecht a écrit :
I was in the process of adding mapping to the autoloader class and
started wondering.
Would anybody have an issue if :
create a static map between class name and relative path for all
mappings (per autoloader)
create a script that extract the class names from the files and
automatically create the map.
run the script and copy the map into the autoloader
?
This should be faster
This would make the process of referencing classes semi-automatic
The process could be extended so that we could synch all autoloaders
by running a command.
--
____________________________________
Meilleures salutations
Laurent Opprecht
chat: laurent.oppre...@gmail.com
blog: http://ciel.unige.ch/
_______________________________________________
Dev mailing list
Dev@lists.chamilo.org
http://lists.chamilo.org/listinfo/dev
_______________________________________________
Dev mailing list
Dev@lists.chamilo.org
http://lists.chamilo.org/listinfo/dev
--
Met vriendelijke groeten
Sven Vanpoucke
Digitaal Leren
Directie Onderwijs
Hogeschool Gent
http://digitaal-leren.hogent.be/
_______________________________________________
Dev mailing list
Dev@lists.chamilo.org
http://lists.chamilo.org/listinfo/dev