[TYPO3-ect] Autoload-function for lib/div?
Joerg Schoppet
joerg at schoppet.de
Tue Aug 14 10:21:47 CEST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
so here is my third proposal.
What do you think about the possibility to let PHP5 users use the
possibility of the PHP5-SPL-autoload functionality?
At the beginning of TS-configuration, there have to be something like:
inlcudeLibs.tx_myext = EXT::myext/class.tx_myext_Main.php
the class would look like this:
class tx_myext_Main {
function loadClass($className) {
// the logic of tx_div::load...
}
}
if (t3lib_div::int_from_ver(phpversion())>=5000000) {
eval('spl_autoload_register(array(\'tx_myext_Main\', \'loadClass\'));');
}
So for people like myself, who 100% program PHP5 no additional TS like
"includeLibs" or php-code like "tx_div::load..." would be necessary.
Comments?
Joerg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGwWYbq5Me6rRDqPURAhYdAKC/kcjGQNBM6nhI2jrhPtZidntKLQCgrQTn
FzOr+R/4HT2hSBgjWvreQg4=
=Rjzr
-----END PGP SIGNATURE-----
More information about the TYPO3-team-extension-coordination
mailing list