[TYPO3-ect] Reminder: where to put fh_library?
Elmar Hinz
elmar07 at googlemail.com
Sat Jul 28 15:22:32 CEST 2007
Steffen Kamper wrote:
> Hi Franz,
>
> fh_library is an extension of the pibase.
> With lib/div there is no need of pibase anymore.
>
Hi Steffen, Franz,
That's right. lib/div shall be able to provide all features tslib_pibase
does -- and much more. But there are reasons to implement functions into
div that are not directly related to lib:
1.) div is designed as an open collection for static functions maintained by
extension developers.
2.) We need to provide a migration path from tslib_pibase to lib. (see
below)
Maybe we could separate div into 2 classes:
tx_div: static methods related to lib
tx_div_open: static methods that compete with lib
(other ideas: tx_div_x, tx_div_plus, tx_div_free)
Would that be sensible solution?
So which methods compete with lib? Answer:
Methods compete with lib architecture, when they don't use the objects
$configurations, $parameters and $context to access those data including
flexforms. So this are functions that directly access flexform values etc.
The recent posting from Stefan Geith already showed, that we also should
offer a migration path, to enbale people to move old extensions step by
step to lib/div architectury.
I am thinking of a "migration controller". That controller would mix the API
of tslib_pibase with the API of tx_lib_controller. People would start by
exchanging the parent object
class myExtension extends tslib_pibase { ... }
first to "dirty".
class myExtension extends tx_lib_pibaseController { ... }
When the migration is done the change to "clean"
class myExtension extends tx_lib_controller { ... }
Unfortunatly PHP can't inherit an object from 2 parent object. So a huge
interface needs to be written to map all the function of tslib_pibase.
That's why this is on the roadmap later.
More information about the TYPO3-team-extension-coordination
mailing list