[TYPO3-50-general] Helping Functions
typo3 at perseguers.ch
Mon Feb 2 13:18:11 CET 2009
>> Is there currently a way so I don't need to write all this set/get
> Currently (IMHO) we require you to write all getters / setters by hand.
> In the middle-long term, there will be scaffolding for that - but you
> should do that because the domain layer should not contain any "magic".
> When Eclipse supports namespace syntax, it'll be much nicer to work with
> if you have explicit getters/setters.
> If you, however, require a way to access getters/setters
> programmatically, we've created helpers in Reflection/ObjectAccess.php.
> This is a kind of Java Beans implementation for PHP.
I'm using the method shown on  for my current 4.x development. It
works very well and the interesting part is that it is similar than
$myobject->someProperty = "hello world!";
which I find better and similar to C#.
The overhead of the method shown in term of definition of private and
public fields that are then overriden at instantiation time is a bit
high though. But I would love to have such feature (enhanced of course)
More information about the TYPO3-project-5_0-general