[TYPO3-ect] Autoload-function for lib/div?
Joerg Schoppet
joerg at schoppet.de
Tue Aug 14 13:33:28 CEST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Christian Welzel wrote:
> Joerg Schoppet wrote:
>
>> So for people like myself, who 100% program PHP5 no additional TS like
>> "includeLibs" or php-code like "tx_div::load..." would be necessary.
>
> But how do you handle class overrides then?
>
> If the normal TS-Config is used:
>> inlcudeLibs.tx_myext_list = EXT::myext/class.tx_myext_list_controller.php
>> inlcudeLibs.tx_myext_edit = EXT::myext/class.tx_myext_edit_controller.php
>> inlcudeLibs.tx_myext_remove = EXT::myext/class.tx_myext_remove_controller.php
>
> And i want to use my own implementation of the edit controller i can simply
> copy the original class file, edit the code and then load it with
>> inlcudeLibs.tx_myext_edit = EXT::overrideext/class.tx_myext_edit_controller.php
> and the whole stuff works out of the box without any modifying of the "myext" ext.
> And it is upgrade safe as long as this single file is not affected.
>
> How could that work, if the autoload mechanism is used?
>
If I understand it right, actually you would do the following:
includeLibs.tx_myext_edit =
EXT:overrideext/class.tx_overrideext_edit_controller.php
plugin.myext.form.userFunc = tx_overrideext_edit_controller->main
With the autoload mechanism you just can remove the first line.
if there is "plugin.myext.form.userFunc =
tx_myext_edit_controller->main", then the autoload-function searches for
tx_myext_edit_controller.
if there is "plugin.myext.form.userFunc =
tx_overrideext_edit_controller->main", then the autoload-function
searches for ty_overrideext_edit_controller.
Joerg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGwZMIq5Me6rRDqPURAl4QAJ9+GmUzTVD0EuDjJzA/QJpwb4bGNQCfWMjU
5pXnChSlgUuV+i9+JX+mcZw=
=TtbC
-----END PGP SIGNATURE-----
More information about the TYPO3-team-extension-coordination
mailing list