Skip to content

A microdata-based API server written in PHP using PostgreSQL

License

Notifications You must be signed in to change notification settings

superuserdev/schemaserver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Waffle.io - Columns and their card count

schemaserver

GitHub license GitHub version Build Status GitHub issues GitHub pull requests Join the chat at https://gitter.im/schemaserver/Lobby

GitHub forks GitHub stars Twitter

A microdata-based API server written in PHP using PostgreSQL


Overview

A PHP implementation of shgysk8zer0/api-specs using PostgreSQL.

Installation

git submodule add git://github.com/superuserdev/schemaserver.git path/to/classes/superuserdev/schemaserver

If you or on Fedora, install PostgreSQL using:

sudo dnf install php-pgsql

Usage

<?php
namespace Project\Example;
// Setup auto-loading using `spl_autoload`
set_include_path(realpath('path/to/classes') . PATH_SEPARATOR . get_include_path());
spl_autoload_extensions('.php');
spl_autoload_register();
// Alias
use \SuperUserDev\SchemaServer\{Thing}

// Use (need to set Content-Type header)
header('Content-Type: ' . Thing::CONTENT_TYPE);

$thing = new Thing();
$thing->name = 'Thing 1';
echo json_encode($thing);