A simple Framework for reusing existing Objects as a base for REST-APIs.

dev-master 2016-10-24 10:39 UTC

This package is not auto-updated.

Last update: 2024-05-15 18:42:43 UTC


README

Platypus is a simple Framework written in PHP for reusing existing Objects as a base for REST-APIs. It supports automatic generation of HATEOAS-links and makes use of annotations - so (in most cases) the code can stay the same.

A very basic example could look like this:

<?php
/**
 * @self /user/{name}
 */
class User {
	/**
	 * @method get
	 */
	public function get($name) {
		return ['name' => $name];
	}
}

More at restful-platyp.us.