enlightened-dc / 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 not auto-updated.
Last update: 2021-06-12 01:09:22 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 了解如何贡献。