I'd like to create a variable that 'points' to a class method like this:
$obj = $this->myMethod();
$obj->call();
or
$obj = $myClass->myMethod();
$obj->call();
Is this possible?
Edit:
Why I'd like to be able to do this:
private $default_field_callback = array(
"methods" => array(
"timestamp" => array(
"object" => {object},
"method" => "getTimestamp",
"params" => array("Y-m-d H:i:s")
),
)
);
$obj = $this->myMethod()will result in$objcontaining whatever$this->myMethod();returns, not an "instance" of$this->myMethod(). Why do you want to do this?