Michael Bakonyi
2014-05-29 14:06:53 UTC
Hi,
I'd like to do something like this:
if (method_exists($object, 'get' . ucfirst($property))) {
$children = $object->{'get' . ucfirst($property)};
}
but this is not working unfortunately – $children is always NULL
although the getter exits. Is there a another way to build a dynamic getter?
Cheers,
Michael
I'd like to do something like this:
if (method_exists($object, 'get' . ucfirst($property))) {
$children = $object->{'get' . ucfirst($property)};
}
but this is not working unfortunately – $children is always NULL
although the getter exits. Is there a another way to build a dynamic getter?
Cheers,
Michael
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php