I am having problem getting data back from a function. If I go to the php manual, with task you can send a return parameter that you can use later. But here I dont seem to be able to pass that parameter.
class GearmanTest
{
static function workCB($func, $handle, $result){
var_dump($result);
}
function doWork($param)
{
$client = new Net_Gearman_Client("localhost");
$set = new Net_Gearman_Set();
$task = new Net_Gearman_Task("gearman_function", $param);
I am having problem getting data back from a function. If I go to the php manual, with task you can send a return parameter that you can use later. But here I dont seem to be able to pass that parameter.
class GearmanTest { static function workCB($func, $handle, $result){ var_dump($result); }
function doWork($param) { $client = new Net_Gearman_Client("localhost"); $set = new Net_Gearman_Set(); $task = new Net_Gearman_Task("gearman_function", $param);
}
}
//using it here $engine = new GearmanTest(); $out = $engine->doWork('123'); //dont know how to return the out data