[TYPO3-core] RFC #8985: Enable USER object to become USER_INT on the fly

Ingo Renner ingo at typo3.org
Mon Jul 21 10:36:09 CEST 2008


Martin Kutschker wrote:

Hi Masi and Peter,

>>> Oh come on, tslib_content has upper case names for all cObject types. It
>>> makes more sense to have a consistent naming within this file
>>> (convertTo_USER_INT) as to stick a*nasty*Amercian*term*y to some guide
>>> lines *
>> just because we did it wrong until now, doesn't mean we have to continue
>> doing it wrong, does it?
> 
> It's a matter of style and taste. Using camel case is style, so not
> using it is not wrong per se.

I thought about it a little more... As I'm currently also working on the 
new functions for the templating system, here's some info from that side:

With the new system you'll be able to pass objects to the engine:

$template->addVariable('myVariable', new MyObject());

You can then use it in your template with this marker 
###MYVARIABLE.SOME_PROPERTY###

The engine will then take care of finding the MYVARIABLE markers and 
translate the SOME_PROPERTY part to a 'getSomeProperty()' call on the 
object.

... so strictly and consitantly using camleCase is not only a matter of 
style but also an issue of 'automated' method finding (let's call it 
like that for now -  I don't know a better name ATM).

Do you agree and see the point?


best
Ingo

-- 
Ingo Renner
TYPO3 Core Developer, Release Manager TYPO3 4.2


More information about the TYPO3-team-core mailing list