dev-master
9999999-dev http://github.com/akiban/php-akibanREST Service Client for Akiban
Apache-2.0
The Requires
The Development Requires
database akiban
REST Service Client for Akiban
Akiban Server has a REST API. This client allows easy interaction with this API., (*1)
Create composer.json
file in your project root:, (*2)
{ "require": { "akiban/akiban-php": "dev-master" } }
Then download composer.phar
and run the install command:, (*3)
curl -s http://getcomposer.org/installer | php && ./composer.phar install
<?php require 'vendor/autoload.php'; use Akiban\AkibanClient; // Instantiate an Akiban client $client = AkibanClient::factory(array('scheme' => 'https', 'username' => 'user', 'password' => 'pass', 'hostname' => 'localhost')); // Retrieve an entity named 'hopes' with an ID of 3 // returns a JSON document representing the entity echo $client->getEntity('hopes', 3); // Execute a SQL query // results are returned in JSON format echo $client->executeSqlQuery('select * from hopes'); // Execute multiple SQL statements in 1 transaction // results for each statement are returned as a field // in a JSON document $queries = array( 'select max(id) from hopes', 'select * from hopes' ); echo $client->executeMultipleSqlQueries($queries);
REST Service Client for Akiban
Apache-2.0
database akiban