2017 © Pedro Peláez
 

library superbase-sdk-php

SuperBase Backend-as-a-Service Client SDK for PHP

image

superbase-io/superbase-sdk-php

SuperBase Backend-as-a-Service Client SDK for PHP

  • Sunday, August 17, 2014
  • by joostfaassen
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Introduction

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)

Installation

Add superbase/superbase-sdk-php to your require key in your composer.json file. Then update your vendor directory by running:, (*3)

composer update

Configuration

The SuperBase SDK needs to know the following information to connect to SuperBase:, (*4)

  • apikey
  • apisecret
  • backend
  • datacenter

The simplest solution is to create an ``.ini` file in one of the following locations:, (*5)

  • ~/.superbase/config
  • /etc/superbase.conf

An 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)

Usage example

```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)

The Versions

17/08 2014

dev-master

9999999-dev http://www.github.com/superbase-io/superbase-sdk-php

SuperBase Backend-as-a-Service Client SDK for PHP

  Sources   Download

The Requires

 

api php cloud users baas