Service/GearmanClient.php
protected function doEnqueue(array $worker, $params, $method, $unique)
    {
        $gearmanClient = $this->getNativeClient();
        $this->assignServers($gearmanClient);

        $result = $gearmanClient->$method($worker['job']['realCallableName'], $params, $unique);
        $this->returnCode = $gearmanClient->returnCode();

        $this->gearmanClient = null;

        return $result;
    }
protected function doEnqueue(array $worker, $params, $method, $unique)
    {
        $gearmanClient = $this->getNativeClient();
        $this->assignServers($gearmanClient);

        $result = $gearmanClient->$method($worker['job']['realCallableName'], $params, $unique);
        $this->returnCode = $gearmanClient->returnCode();

        $this->gearmanClient = null;

        return $result;
    }
protected function doEnqueue ( array $ worker , $ params , $ method , $ unique ) { $ gearmanClient = $ this -> getNativeClient ( ) ; $ this -> assignServers ( $ gearmanClient ) ; $ result = $ gearmanClient -> $ method ( $ worker [ 'job' ] [ 'realCallableName' ] , $ params , $ unique ) ; $ this -> returnCode = $ gearmanClient -> returnCode ( ) ; $ this -> gearmanClient = null ; return $ result ; }
Execute a GearmanClient call given a worker, params and a method.

If he GarmanClient call is asyncronous, result value will be a handler.
Otherwise, will return job result.

@param array  $worker Worker definition
@param string $params Parameters to send to job as string
@param string $method Method to execute
@param string $unique A unique ID used to identify a particular task

@return mixed Return result of the GearmanClient call
Execute a GearmanClient call given a worker params and a method .