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::meth od();
which works fine.
However, what if I don't know the classname yet?
$classname::met hod();
doesn't work, neither does
{$classname}::m ethod();
I've got solved it like this now:
call_user_func( array($classnam e,'method'));
But I really wonder wether this is a good way to do it.
Grtz,
--
Rik Wasmus
If I want to call the method a class (not an object), one normally uses:
classname::meth od();
which works fine.
However, what if I don't know the classname yet?
$classname::met hod();
doesn't work, neither does
{$classname}::m ethod();
I've got solved it like this now:
call_user_func( array($classnam e,'method'));
But I really wonder wether this is a good way to do it.
Grtz,
--
Rik Wasmus
Comment