dev-master
9999999-dev http://www.github.com/superbase-io/superbase-sdk-phpSuperBase Backend-as-a-Service Client SDK for PHP
The Requires
api php cloud users baas
Wallogit.com
2017 © Pedro Peláez
SuperBase Backend-as-a-Service Client SDK for PHP
SuperBase.io is a Backend-as-a-Service. More information on http://superbase.io, (*1)
This repository contains the PHP SDK For SuperBase.io, (*2)
Add superbase/superbase-sdk-php to your require key in your composer.json file.
Then update your vendor directory by running:, (*3)
composer update
The SuperBase SDK needs to know the following information to connect to SuperBase:, (*4)
The simplest solution is to create an ``.ini` file in one of the following locations:, (*5)
~/.superbase/config/etc/superbase.confAn example configuration may look like this:, (*6)
[default] apikey = MY_API_KEY apisecret = MY_API_SECRET backend = MY_BACKEND_CODE datacenter = MY_DATACENTER_CODE
This information can be found on your SuperBase.io Dashboard, (*7)
```php
use SuperBaseSdk\Common\SuperBase;
// Enable autoloading through Composer
require_once (__DIR__ . '/../../vendor/autoload.php');
// Instantiate the SuperBase helper class
$superbase = new SuperBase();
// This will load the configuration from a superbase config file (see above)
// Optionally provide a filename to specify a non-default filename
$config = $superbase->getConfig();
// Instantiate a client for the User-service
$userclient = $superbase->getClient('user', $config);
// Retrieve the test user
$user = $userclient->getUser('joe');
echo "Loaded " . $user->getDisplayName() . "!\n";
Check the examples/ directory for more examples., (*8)
SuperBase Backend-as-a-Service Client SDK for PHP
api php cloud users baas