Calling class method of variable class.

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
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:
which works fine.

However, what if I don't know the classname yet?
doesn't work, neither does

I've got solved it like this now:

But I really wonder wether this is a good way to do it.

Rik Wasmus

Re: Calling class method of variable class.

Rik wrote:
Quoted text here. Click to load it

Yes, thats the correct way.  Its called a callback.

Site Timeline