GearmanWorker::clone

(PECL gearman >= 0.5.0) Create a copy of the worker public void GearmanWorker::clone ( void ) Creates a copy of the worker. Returns: A GearmanWorker object

GearmanWorker::addServers

(PECL gearman >= 0.5.0) Add job servers public bool GearmanWorker::addServers ( string $servers = 127.0.0.1:4730 ) Adds one or more job servers to this worker. These go into a list of servers that can be used to run jobs. No socket I/O happens here. Parameters: servers A comma separated list of job servers in the format host:port. If no port is specified, it defaults

GearmanWorker::addServer

(PECL gearman >= 0.5.0) Add a job server public bool GearmanWorker::addServer ([ string $host = 127.0.0.1 [, int $port = 4730 ]] ) Adds a job server to this worker. This goes into a list of servers than can be used to run jobs. No socket I/O happens here. Parameters: host The job server host name. port The job server port.

GearmanWorker::addOptions

(PECL gearman >= 0.6.0) Add worker options public bool GearmanWorker::addOptions ( int $option ) Adds one or more options to the options previously set. Parameters: option The options to be added Returns: Always returns TRUE. See also: GearmanWorker::options

GearmanWorker::addFunction

(PECL gearman >= 0.5.0) Register and add callback function public bool GearmanWorker::addFunction ( string $function_name, callable $function [, mixed &$context [, int $timeout ]] ) Registers a function name with the job server and specifies a callback corresponding to that function. Optionally specify extra application context data to be used when the callback is called and a timeout. Parameters:

GearmanTask::uuid

(PECL gearman <= 0.5.0) Get the unique identifier for a task (deprecated) public string GearmanTask::uuid ( void ) Returns the unique identifier for this task. This is assigned by the GearmanClient, as opposed to the job handle which is set by the Gearman job server. Note: This method has been replaced by GearmanTask::unique() in the 0.6.0 release of the Gearman extension. Returns: The uni

GearmanTask::unique

(PECL gearman >= 0.6.0) Get the unique identifier for a task public string GearmanTask::unique ( void ) Returns the unique identifier for this task. This is assigned by the GearmanClient, as opposed to the job handle which is set by the Gearman job server. Returns: The unique identifier, or FALSE if no identifier is assigned. See

GearmanTask::taskNumerator

(PECL gearman >= 0.5.0) Get completion percentage numerator public int GearmanTask::taskNumerator ( void ) Returns the numerator of the percentage of the task that is complete expressed as a fraction. Returns: A number between 0 and 100, or FALSE if cannot be determined. See also: GearmanTask::taskDenominator

GearmanTask::taskDenominator

(PECL gearman >= 0.5.0) Get completion percentage denominator public int GearmanTask::taskDenominator ( void ) Returns the denominator of the percentage of the task that is complete expressed as a fraction. Returns: A number between 0 and 100, or FALSE if cannot be determined. See also: GearmanTask::taskNumer

GearmanTask::sendWorkload

(PECL gearman >= 0.6.0) Send data for a task public int GearmanTask::sendWorkload ( string $data ) Parameters: data Data to send to the worker. Returns: The length of data sent, or FALSE if the send failed. This function is EXPERIMENTAL. The behaviour of this function, its name, and surrounding documentation