|
Posted by Rik on 08/18/06 13:06
Yes, it's the week of OO here in c.l.php
If I want to call the method a class (not an object), one normally uses:
classname::method();
which works fine.
However, what if I don't know the classname yet?
$classname::method();
doesn't work, neither does
{$classname}::method();
I've got solved it like this now:
call_user_func(array($classname,'method'));
But I really wonder wether this is a good way to do it.
Grtz,
--
Rik Wasmus
[Back to original message]
|