I don't think you can pass methods as parameters. However, you can pass the object and call it's method from within your function:
function run($Object) {
$Object->Method();
}
However, doing: $Object->Method(); without passing it to a function seems a little more straight forward.
Not sure if this is exactly what you were asking, but hope it helps anyways!
Cheers,
Jason
igor wrote:
Hello all.
Can i to work with methods from class, name of which i send as params? For example:
...
function run($Method) {
$this->$$Method;
}
But this don't work.