[TYPO3-ect] Services in TYPO3 with lib/div
Elmar Hinz
elmar07 at googlemail.com
Wed Jul 18 13:17:14 CEST 2007
>
> *But*, as I go further in the development process, I realize that I need
> a controller, a model and a view in my service!
Hi Fabien,
well that is a very interesting point you come to. I didn't think about this
possibility so far. It sounds like an approach, that could become a useful
fundamental concept to make lib/div more flexible: services that are mvc
themself.
That is related to subcontrollers which do the same, but without doing it in
form of a service. With the last update I implemented the subcontroller
feature by adding 2 new parameters to the main function:
function main($input, $configurations, $context=NULL, $parameters=NULL)
A lib/div specific service could be based on this directly, that takes this
four parameters.
Also non lib/div specific services could also be done with lib/div. The
service (but not the user of the service) would need to prepare/customize
the parameters of main() to send all required input values to the service.
There is one limitation. The return value of such a service is always a
string.
Regards
Elmar
More information about the TYPO3-team-extension-coordination
mailing list