[TYPO3-50-general] Magic Get too magic?
elmar.hinz at team.MINUS.red.DOT.net
Fri Feb 23 09:38:26 CET 2007
in Java I have learned never to access object variables directly, but
always to access them by getters/setters.
I like this:
A.) Plain setters/getters that don't manipulate values:
They are named get/set.
2.) Named setters/getters:
B.) Setters/getters that perform some action like instantiation, loading,
They are named but by their performing action, to document what they do.
$Class = Factory::findService('SomeService');
$T3 = TYPO3::findIt() ... or $T3 = TYPO3::makeIt() ...
$variable = $this->loadSomeVariableName();
More information about the TYPO3-project-5_0-general