[TYPO3-dev] How to use the new autoloader feature?

bernd wilke xoonsji02 at sneakemail.com
Tue Jun 2 12:43:49 CEST 2009


On Mon, 01 Jun 2009 23:13:28 +0200 Ingo Renner wrote:

> Martin Kutschker wrote:
> 
> hi Masi,
> 
>> IMHO using a standard filename and class name pattern should be enough
>> for the autoloader to find the class. Only legacy class names that
>> don't match the requirements should be registered manually.
> 
> Yes, that was my opinion at first too. However I changed my mind about
> that in favor of the "registry", here's why: Building the path to a
> class file from its name might be nice, but would always require an
> additional file_exists() call which in again (AFAIK) does some more file
> system calls in the PHP core... this makes the autoloader unnecessary
> slow. With the registry file you only have on single file_exists call or
> when setting a flag in ext_emconf.php that one wouldn't be needed
> either.

what about a dynamic list? (kind of cache)
on call of a class the path can be in the list and all is fine.
but if the class is not in list the path can be build up from classname 
and inserted in list if it exists.

and keep watch about removed extensions and classes:
who will clear the list from unavailable (and unneccessary) entries?

bernd
-- 
http://www.pi-phi.de/t3v4/cheatsheet.html




More information about the TYPO3-dev mailing list