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" <laurent.oppre...@unige.ch> 
Aan: dev@lists.chamilo.org 
Verzonden: Vrijdag 13 mei 2011 16:54:03 
Onderwerp: Re: [chamilo-dev] autoload 

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 
> 


-- 
____________________________________ 
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 


-- 
Met vriendelijke groeten 

Sven Vanpoucke 
Digitaal Leren 
Hogeschool Gent 
http://digitaal-leren.hogent.be 
_______________________________________________
Dev mailing list
Dev@lists.chamilo.org
http://lists.chamilo.org/listinfo/dev

Reply via email to