[TYPO3-ect] translations with lib/div
Steffen Kamper
steffen at sk-typo3.de
Mon Jul 30 12:50:13 CEST 2007
"Elmar Hinz" <elmar07 at googlemail.com> schrieb im Newsbeitrag
news:mailman.1.1185791021.28827.typo3-team-extension-coordination at lists.netfielders.de...
>>
>> btw - why don't using the configuration in
>> $this->controller['conf']
>>
>
> Hi Steffen,
>
> you will meet the pattern of this question again and again. "Why not
> putting
> this function and that configuration into the controller? It's easier to
> access then!".
>
> The answer: All this people are right, if you take the suggestion
> isolated.
> Things are easier to access directly the controller. But if we put all
> this
> back into the controller, we have tslib_pibase again. A monolithic class
> that contains a hundred functions and variables.
>
> lib brings order into the thingies. But order always has a price. It's
> some
> additional typing for the namespaces.
>
> Btw. in full telling words it is:
>
> $this->controller['configurations']
> $this->controller->configurations
>
> Wich tends out to be even 2 signs longer.
>
> In JavaScript and Java it would be shorter. Similar to
> like "this.controller.configurations" or even "controller.configurations".
> PHP has disadvantages here for historical reasons.
>
> Regards
>
> Elmar
>
>
Hi Elmar,
i don't want to have the pibase in lib. My only attention was to get the
configuration in any case (and sure, as easy as possible).
Atm you have to get a single param with
$this->controller->configurations->get($param);
May be I'm blocked, but this method only works, if you know the param. But
may be you want to access unknown params as well, then it is more easy to
walk through the array.
The same limit i had e.g. with t3lib_div::_GP($param) which makes it
complicate without knowing the params.
Don't missunderstand me, I don't insist on any method, i only want to help
with suggesting and discussing methods.
vg Steffen
More information about the TYPO3-team-extension-coordination
mailing list