[FLOW3-general] Fluid: call a property by name with an own argument

Sebastian Kurfürst sebastian at typo3.org
Thu Nov 3 17:51:36 CET 2011


Hey Jens,

>     public function render($entity, $propertyName) {
>         $getterName = 'get' . ucfirst($propertyName);
>         return $entity->$getterName();
Nitpick: Instead of this, you should use
\TYPO3\FLOW3\Reflection\ObjectAccess::getProperty... :-)

Greets, Sebastian


More information about the FLOW3-general mailing list