[TYPO3-core] RFC #9523: class.t3lib_htmlmail.php produces null headers in HTML messages

Martin Kutschker masi-no at spam-typo3.org
Fri Oct 10 10:31:33 CEST 2008


Martin Kutschker schrieb:
> Xavier Perseguers schrieb:
>> Hi,
>>
>>>> as although declared as public, the getHTMLContentType() method is used
>>>> only from within the class itself.
>>> "public" and friends were only possible in 4.2 after the switch to PHP5.
>>> To avoid breaking older stuff protected is only used for new methods.
>> Yes, just to notice that it would have been better to write a @private
>> in the comments, just as it was good-coding before PHP5.
> 
> But declaring it as "public" and commenting it as @private would raise
> questions again :)
> 
> Then you would need an extra comment that explains why there is a
> difference.

Anyway, until "now" most functions were public (not even @private), so
folks tended to use probably all functions at will even it is more or
less clear that this is only a private helper function. AFAIR there are
a number of functions with a _ prefix, that ought to be redeclared as
protected.

Masi


More information about the TYPO3-team-core mailing list