GearmanClient::setDataCallback

(PECL gearman >= 0.6.0) Callback function when there is a data packet for a task public bool GearmanClient::setDataCallback ( callable $callback ) Sets the callback function for accepting data packets for a task. The callback function should take a single argument, a GearmanTask object. Parameters: callback A function or method to call Returns:

GearmanClient::setData

(PECL gearman <= 0.5.0) Set application data (deprecated) public bool GearmanClient::setData ( string $data ) Sets some arbitrary application data that can later be retrieved by GearmanClient::data(). Note: This method has been replaced by GearmanCient::setContext() in the 0.6.0 release of the Gearman extension. Parameters: data Sets some arbitrary application dat

GearmanClient::setCreatedCallback

(PECL gearman >= 0.5.0) Set a callback for when a task is queued public bool GearmanClient::setCreatedCallback ( string $callback ) Sets a function to be called when a task is received and queued by the Gearman job server. The callback should accept a single argument, a GearmanTask oject. Parameters: callback A function to call Returns: Return

GearmanClient::setContext

(PECL gearman >= 0.6.0) Set application context public bool GearmanClient::setContext ( string $context ) Sets an arbitrary string to provide application context that can later be retrieved by GearmanClient::context(). Parameters: context Arbitrary context data Returns: Always returns TRUE.

GearmanClient::setCompleteCallback

(PECL gearman >= 0.5.0) Set a function to be called on task completion public bool GearmanClient::setCompleteCallback ( callable $callback ) Use to set a function to be called when a task is completed. The callback function should accept a single argument, a GearmanTask object. Parameters: callback A function to be called Returns: Returns TRUE

GearmanClient::setClientCallback

(PECL gearman <= 0.5.0) Callback function when there is a data packet for a task (deprecated) public void GearmanClient::setClientCallback ( callable $callback ) Sets the callback function for accepting data packets for a task. The callback function should take a single argument, a GearmanTask object. Note: This method has been replaced by GearmanClient::setDataCallback() in the 0.6.0 release of the Gearman extension

GearmanClient::runTasks

(PECL gearman >= 0.5.0) Run a list of tasks in parallel public bool GearmanClient::runTasks ( void ) For a set of tasks previously added with GearmanClient::addTask(), GearmanClient::addTaskHigh(), GearmanClient::addTaskLow(), GearmanClient::addTaskBackground(), GearmanClient::addTaskHighBackground(), or GearmanClient::addTaskLowBackground(), this call starts running the tasks in parallel. Returns:

GearmanClient::returnCode

(PECL gearman >= 0.5.0) Get the last Gearman return code public int GearmanClient::returnCode ( void ) Returns the last Gearman return code. Returns: A valid Gearman return code.

GearmanClient::removeOptions

(PECL gearman >= 0.6.0) Remove client options public bool GearmanClient::removeOptions ( int $options ) Removes (unsets) one or more options. Parameters: options The options to be removed (unset) Returns: Always returns TRUE.

GearmanClient::ping

(No version information available, might only be in Git) Send data to all job servers to see if they echo it back public bool GearmanClient::ping ( string $workload ) Sends some arbitrary data to all job servers to see if they echo it back. The data sent is not used or processed in any other way. Primarily used for testing and debugging. Parameters: workload Some arbitrar