[TYPO3-core] RFC: #6829 - New general template-class usable for FE+BE

Steffen Kamper steffen at sk-typo3.de
Mon Nov 26 09:13:46 CET 2007


Hi Dmitry,

"Dmitry Dulepov [typo3]" <dmitry at typo3.org> schrieb im Newsbeitrag 
news:mailman.1.1196063490.7146.typo3-team-core at lists.netfielders.de...
> Steffen Kamper wrote:
>> "Martin Kutschker" <martin.kutschker-n0spam at no5pam-blackbox.net> schrieb 
>> im Newsbeitrag 
>> news:mailman.1.1196026288.7868.typo3-team-core at lists.netfielders.de...
>>> Steffen Kamper schrieb:
>>>> Hi,
>>>>
>>>> "Ingmar Schlecht" <ingmar at typo3.org> schrieb im Newsbeitrag 
>>>> news:mailman.1.1196002000.24558.typo3-team-core at lists.netfielders.de...
>>>>> +1 based on reading.
>>>>>
>>>>> cheers
>>>>> Ingmar
>>>>>
>>>> i made a little cleaning: removed rest, added braces and a better 
>>>> condition for wrap
>>> <nitpicking>Then you should have used $a = $b instead of $a=$b in the 
>>> patch.</nitpicking>
>>>
>>> PHP 5.1 question:
>>>
>>> Can we turn this
>>>
>>> substituteMarkerArray($content, $markContentArray,
>>>                       $wrap='',$uppercase=0){ if 
>>> (is_array($markContentArray)) {
>>>   ...
>>>   }
>>> }
>>>
>>> into that?
>>>
>>> substituteMarkerArray($content, array $markContentArray,
>>>                       $wrap='',$uppercase=0){ }
>>>
>>> That is use type hinting instead of checking for the type.
>>>
>>> Masi
>>
>> no problem with nitpicking :-)
>> Is there a consistent rule ?
>> $a = $b
>> should that also used in parameters of functions ?
>> what's about if($a == $b) or if($a==$b) or if ($a == $b) ?
>
> Try extdeveval, which implements code formatting according to conventions. 
> You will see :)
>
> Generally, we follow Zend's conventions, which means:
>
> function a($a, $b) {
> if ($a == $b) {
> $d = $a;
> }
> else {
> $d = 'oops!';
> }
> return $d;
> }
>
> -- 
> Dmitry Dulepov
> TYPO3 core team
> Web: http://typo3bloke.net/
> Skype: callto:liels_bugs

good to know, thx!

so same for parameters?
function($a, $b = 'green') {

vg  Steffen 




More information about the TYPO3-team-core mailing list