[TYPO3-ect] Autoload-function for lib/div?

Joerg Schoppet joerg at schoppet.de
Tue Aug 14 12:32:48 CEST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Elmar Hinz wrote:
> Hi,
> 
> do you only have to include EXT:lib/class.tx_lib.php, or do you have to
> include all class files this way? 
> 
> I fear I still don't get the point. If I need to include all files in TS,
> what is the loading good for? The files are already included then.
> 
> Regards
> 
> 
> 
> 
Ah, now I got your point.

No, you only have to include class.tx_lib.php (in PHP5). As soon as the
function spl_autoload_register was executed, each time a new-operater or
class_exists()-method is used and the class is not available, the method
tx_lib::loadClass() is called with the class-name as parameter.

This function is then responsible to find the class-file and include it.

I hope, now it is clear.

Joerg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGwYTPq5Me6rRDqPURAqBJAJ4wOpx1G3coJOl8cVws36X547inXwCeJJ5F
tc76h1S6CHqQd8gwo9SJADY=
=3qaq
-----END PGP SIGNATURE-----


More information about the TYPO3-team-extension-coordination mailing list