2017 © Pedro Peláez
 

library rest-action

Rest(ful) aware PSR-15 Middleware library

image

objective-php/rest-action

Rest(ful) aware PSR-15 Middleware library

  • Thursday, May 24, 2018
  • by gauthier
  • Repository
  • 6 Watchers
  • 0 Stars
  • 143 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 581 % Grown

The README.md

rest-action

Rest(ful) aware PSR-15 Middleware library, (*1)

Getting started

RestAction provide an easy way to build versioned API endpoints and support proactive content negotiation., (*2)

$action = new RestAction();

/*
 * Assume our RestAction has `application/xml` and `application/json` available
 * as media types, in order of highest-to-lowest preference for delivery
 */
$action->registerSerializer('application/*json', JsonSerializer::class);

/*
 * Assume our RestAction has two Endpoints version available with
 * requests like `https://api.example/users` with `API-VERSION:1.0.0` or `API-VERSION:2.0.0` header
 *
 * Note that it support Semver matching, so the resource is also available with
 * requests like `https://api.example/users` with `API-VERSION:1` or `API-VERSION:2` header
 */
$action->registerEndpoint('1.0.0', UsersEndpointV1::class);
$action->registerEndpoint('2.0.0', UsersEndpointV2::class);

The Versions

24/05 2018

dev-master

9999999-dev https://github.com/objective-php/rest-action

Rest(ful) aware PSR-15 Middleware library

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

by Flavien Rodrigues

rest action psr-15 objective php

24/05 2018

v2.0.0

2.0.0.0 https://github.com/objective-php/rest-action

Rest(ful) aware PSR-15 Middleware library

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

by Flavien Rodrigues

rest action psr-15 objective php