[TYPO3-50-general] Magic Get too magic?
Robert Lemke
robert at typo3.org
Fri Feb 23 08:39:30 CET 2007
Hi folks,
I just stumbled again over the magic Getter method I implemented in
the TYPO3 class [1]. The only purpose is to save developers some
typing. Instead of
TYPO3::getInstance()->getComponentManager()->...
they may write
TYPO3::getInstance()->componentManager->...
However, I more and more tend to not like it. First thing is that
there are now two ways for getting the property and secondly I ask my
self if we should allow accessing properties directly (even through a
magic Getter) at all.
Now, before I remove that magic from TYPO3 - what do you think about
magic Getters and Setters?
Robert
[1] http://5-0.dev.typo3.org/trac/TYPO3/browser/Packages/Core/Classes/
TYPO3.php
--
http://typo3.org/gimmefive
More information about the TYPO3-project-5_0-general
mailing list