[TYPO3-commerce] RFC Feature: #28959: New hook in tx_commerce_pibase::makeBasketView()

Marcus Krause marcus#exp2011 at t3sec.info
Thu Aug 18 13:57:21 CEST 2011


Hi!

Michael Knabe schrieb am 08/18/2011 01:03 PM Uhr:
> Am 17.08.2011 15:39, schrieb Michael Knabe:
>> Hi Marcus,
>>
>>> Notes:
>>> Due to the amount of arguments, they have been bundled in a parameter
>>> array (inspired by t3lib_PageRenderer hooks).
>> I don't like the idea of putting the parameters into an array. On one
>> hand it hides a problem (I consider requiring so many parameters a
>> design problem) instead of solving it. It's not on you to fix the design
>> flaw here but at least you shouldn't try to hide it.
>> On the other hand it precludes the usage of type hinting which is
>> especially important if you have many parameters (the more parameters
>> you have the harder it is to remember the correct order).
> 
> I discussed this point with Marcus face to face and we came to no real
> conclusion on which solutions is nicer. To bring about a decision we had
> a foosball-match and he won. So I leave the choice on him (if no one
> else has any objections).
> 
> However my other points are still valid.

Although I've won - *YES* - I reconsidered my patch based on Florian's
notes:

v1
* basketObj will not passed by reference
* each values is passes a single method parameter (no use of array)
* added hook desciption


Marcus.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 28959_v1.diff
Type: text/x-diff
Size: 2383 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-commerce/attachments/20110818/7d4198a8/attachment.diff>


More information about the TYPO3-team-commerce mailing list