alexdevid / rest-server
Simple php REST-server
1.0.6-beta
2015-02-04 07:41 UTC
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2024-12-21 18:19:36 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