alexdevid/rest-server

Simple php REST-server

1.0.6-beta 2015-02-04 07:41 UTC

This package is not auto-updated.

Last update: 2024-04-13 14:55:46 UTC


README

Documentation @todo

  • Installation
  • Usage
  • Docs

Installation:

Using Composer:

  • install Composer
  • composer require alexdevid/rest-server:dev-master

Usage

Somewhere in the begining of your script add this:

<?php

$server = new Alexdevid\RestServer
$server->run();

Then add Controllers

Controllers

Controllers should extend Alexdevid\RestController class and it methods:

public function get();
public function post();
public function put();
public function delete();

Each method is responsible for its own request method. Look examples folder for more info

Testing

You can run PHPUnit tests in tests folder