2017 © Pedro Peláez
 

symfony-bundle normalizedrestapi-bundle

A bundle to normalize the return of Rest API

image

hch/normalizedrestapi-bundle

A bundle to normalize the return of Rest API

  • Friday, December 16, 2016
  • by Hamadi
  • Repository
  • 1 Watchers
  • 2 Stars
  • 3 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

HCHNormalizedRestApiBundle

A bundle to normalize the return of Rest API, (*1)

Installation

Run composer require hch/normalizedrestapi-bundle=dev-master, (*2)

Create erros_code.ini file: php app/console app:create-error-code, (*3)

Basic Usage

The bundle can be used as simply as this, (*4)

<?php

use HCH\NormalizedRestApiBundle\ApiException\ApiException;
use HCH\NormalizedRestApiBundle\ApiResponse\ApiResponse;

public function getProductAction(Product $product) {

    if(!$product){
        throw new ApiException(404);
    }
    return new ApiResponse(array('Product' => $product));
}

The Versions

16/12 2016

dev-master

9999999-dev https://github.com/lechaabani

A bundle to normalize the return of Rest API

  Sources   Download

MIT

The Requires

 

by Hamadi Chaabani

normalizedrestapi

30/10 2016

dev-develop

dev-develop https://github.com/lechaabani

A bundle to normalize the return of Rest API

  Sources   Download

MIT

The Requires

 

by Hamadi Chaabani

normalizedrestapi