dev-master
9999999-devGloubster PHP client
The Requires
The Development Requires
- guzzle/guzzle 3.*
- silex/silex 1.0.x-dev
- ext-zmq *
Wallogit.com
2017 © Pedro Peláez
Gloubster PHP client
A set of synchronous / asynchronous clients to use to query a Gloubster Server., (*2)
Use composer to add it in your project :, (*3)
{
"require": {
"gloubster/client": "0.1.*"
}
}
Synchronous clients are commonly used like in the following example, specific clients use are described below., (*4)
use Gloubster\Exception\ClientRequestException;
use Gloubster\Exception\ClientNotAcknowledgedRequestException;
try {
$acknowledgement = $client->send($job);
} catch (ClientRequestException $e) {
echo "An error occured while querying Gloubster Server, the response was not understood\n";
echo sprintf("Server answered : %s\n", $e->getResponse());
} catch (ClientNotAcknowledgedRequestException $e) {
echo sprintf("Gloubster Server did not acknowledge the query for "
. "the following reason : %s \n", $e->getAcknowledgement()->getReason());
}
ZeroMQ client is very easy to use ; you just to have to provide $transport,
$host and $port., (*5)
use Gloubster\Client\Sync\ZMQClient;
// Will connect to ZMQ socket tcp://localhost:12300
$client = ZMQClient::create('tcp', 'localhost', '12300');
// todo, (*6)
Gloubster PHP Client is released under the MIT license., (*7)
Gloubster PHP client