[TYPO3-core] RFC #8985: Enable USER object to become USER_INT on the fly
Dmitry Dulepov [typo3]
dmitry at typo3.org
Thu Jul 17 10:23:01 CEST 2008
Hi!
Ingo Renner wrote:
> 9, 18: there's IMO no need to add @var for primitive types, should be
> used only for objects
It helps to understand code. But I can get rid of it...
> 11: name the variable $doConvertToUserInt or $convertToUserInt - always
> use lowerCamlCase for variables
Object is called USER_INT, not UserInt. The name chosen to make a quick understanding of code. It does not follow camelcase but the name makes more sense than camelcase in this particular case. Readability of the code is more important than formality.
> 20: call the variable $userObjectType
No problem.
> 27, 34: add a public access designator. What does OT mean? No
> abbreviations, please.
OT = object type. CGL does not disallow abbreviations. If we add more constants we may prefer to separate them from each other in some way. Prefix is a standard way to do it.
> 72: the comment is not quite clear, needs to be indented with a tab
Not according to CGL.
> 75: couldn't that call be moved into the else branch? Seems to be the
> only place where $tempContent is used...
Probably it could.
> 106: name the method convertToUserInt()
To "user integer"? ;) There is no such thing as UserInt in TYPO3.
> didn't test yet. However, it also feels a bit strange to have the plugin
> control the core instead of the other way around.
Well, propose a better patch ;) No one did so far.
> Wouldn't it be possible to check for a configuration variable in the
> plugin's TS ($conf['useCache'] f.e.) and let the core decide depending
> on that? This way the plugin would also save doing the check itself.
No. It is not always variable, it is logic in the code sometimes.
--
Dmitry Dulepov
TYPO3 Core team
More about TYPO3: http://typo3bloke.net/
Subscribe: http://typo3bloke.net/rss.xml
Latest article: http://typo3bloke.net/post-details/how_to_fill_realurl_cache/
More information about the TYPO3-team-core
mailing list