You're almost there, and thinking along the right lines...
Instead of
>>if(function_exists($function)){
(which should incidentaly have read if(function_exists($functionname)){)
you want if (method_exists($this,$functionname)) {
Classes have methods, even though php uses the keyword "function" to define them (as do several other laguages actually!) so because it's a class method rather than a normal function, you use method_exists() rather than funtion_exists()
|