[TYPO3-ect] Beta-Branch of lib/div

Joerg Schoppet joerg at schoppet.de
Wed Aug 15 13:38:12 CEST 2007


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

Joerg Schoppet wrote:
> Joerg Schoppet wrote:
>> Hi,
> 
>> some questions:
> 
>> - Will div also be merged to PHP5?
>> - I just wanted to build the autoload-functionality and realised, that
>> it will be the same function as tx_div::loadClass()! So my suggestion
>> would be make this method the autoload-function and let tx_lib be for
>> the registry-stack. OK?
> 
>> Joerg
> Or we remove tx_div::loadClass() so that we only have one
> class-load-method tx_lib::loadClass().
> 
> 
> Comments?
> 
> Joerg
Sorry for all this posts, but after reading a little bit further I would
now suggest the following:

Assumptions:
spl_autoload_register implements a stack-queue[1].
ext_localconf.php is always included[2].

Result:
In the ext_localconf.php of lib-extension I add the following:
<code>
require_once(t3lib_extMgm::extPath('div') . 'class.tx_div.php');
require_once(t3lib_extMgm::extPath('lib') . 'class.tx_lib_t3Loader.php');
require_once(t3lib_extMgm::extPath('lib') . 'class.tx_lib_pearLoader.php');

spl_autoload_register(array('tx_lib_t3Loader', 'load'));
spl_autoload_register(array('tx_lib_pearLoader', 'load'));
</code>

So, tx_lib will only contains the registry-stack.

Comments?

Joerg

[1] http://us2.php.net/spl_autoload_register
[2]
http://typo3.org/documentation/document-library/core-documentation/doc_core_api/4.1.0/view/2/1/#id3520740
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGwuWkq5Me6rRDqPURAvloAJ9+fA4Did1uqb3EgKPe8L1p4X7J4QCgu3ZV
OWenq9eLgRgXtHLUYWNcjuM=
=m5j9
-----END PGP SIGNATURE-----


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