Job.php
PHP version 5.1.0+
LICENSE: This source file is subject to the New BSD license that is available through the world-wide-web at the following URI: http://www.opensource.org/licenses/bsd-license.php. If you did not receive a copy of the New BSD License and are unable to obtain it through the web, please send a note to license@php.net so we can mail you a copy immediately.
- Author
- Joe Stump
- Category
- Net
- Copyright
- 2007-2008 Digg.com, Inc.
- License
- New BSD License
- Link
- http://pear.php.net/package/Net_Gearman
- Link
- http://www.danga.com/gearman/
- Package
- ShSo\Net\Gearman
- Version
- CVS: $Id$
Constants
\ShSo\Net\Gearman\Job
- See
- ShSo\Net\Gearman\Worker
- Author
- Joe Stump
- Category
- Net
- Copyright
- 2007-2008 Digg.com, Inc.
- License
- New BSD License
- Link
- http://www.danga.com/gearman/
- Version
- Release: @package_version@
Methods

factory(string $job, object $conn, string $handle, string $initParams = array()) : objectCreate an instance of a job
The ShSo\Net\Geraman\Worker class creates connections to multiple job servers and then fires off jobs using this function. It hands off the connection which made the request for the job so that the job can communicate its status from there on out.
| Name | Type | Description |
|---|---|---|
| $job | string | Name of job (func in Gearman terms) |
| $conn | object | Instance of ShSo\Net\Gearman\Connection |
| $handle | string | Gearman job handle of job |
| $initParams | string | initialisation parameters for job |
| Type | Description |
|---|---|
| object | Instance of ShSo\Net\Gearman\Job\Common child |
| Exception | Description |
|---|---|
| \ShSo\Net\Gearman\ShSo\Net\Gearman\Exception |