tm / gearman-connection
此包已被废弃且不再维护。没有建议的替代包。
一个简单、干净的库,用于从您的 gearman 任务服务器获取信息。
1.0.1
2015-09-06 14:49 UTC
Requires
- php: >=5.4.0
- ext-gearman: *
Requires (Dev)
- phpunit/phpunit: @stable
This package is auto-updated.
Last update: 2021-06-11 21:09:30 UTC
README
一个简单、干净的库,用于从您的 gearman 任务服务器获取信息。
最小示例用法
require_once __DIR__ . '/../vendor/autoload.php';
use TM\Gearman as Gearman;
$connection = new Gearman\Connection();
$response = $connection->send(new Gearman\Request('status'));
// Do something with the response ...
echo $response;
自定义
如果您不使用默认值
$connection = new Gearman\Connection(
['host' => 'my.gearman.host, 'port' => 1234]
);
并且您不希望默认自动连接
$connection = new Gearman\Connection(
['host' => 'my.gearman.host, 'port' => 1234],
false
);
...
$connection->connect();
...
贡献
有关如何贡献的信息,请参阅 CONTRIBUTING.md。