2017 © Pedro Peláez
 

library standardized-json-response

Simple class to prepare standardized JSON response based on JSend specification

image

browomir/standardized-json-response

Simple class to prepare standardized JSON response based on JSend specification

  • Friday, November 13, 2015
  • by Browomir
  • Repository
  • 1 Watchers
  • 0 Stars
  • 28 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Standardized Json Response

Simple class to prepare standardized JSON response based on JSend specification, (*1)

Installation

The preferred way to install this class is through composer., (*2)

Either run, (*3)

php composer.phar require browomir/standardized-json-response "dev-master"

or add, (*4)

// composer.json
{
    "require": {
        "browomir/standardized-json-response": "dev-master"
    }
}

to the require section of your composer.json file., (*5)

Usage

This simple example show how you can use this class:, (*6)

require_once 'vendor/autoload.php';

use StandardizedJsonResponse\Response;

$response = new Response();
$response->setStatus(Response::STATUS_SUCCESS);
$response->setData(
    array(
        'lorem' => 'ipsum'
    )
);
$response->setMessage('The message');

echo $response->getEncodedResponse();

Build Status Scrutinizer Code Quality Code Coverage Latest Stable Version Latest Unstable Version Dependency Status Total Downloads License, (*7)

The Versions

13/11 2015

dev-master

9999999-dev

Simple class to prepare standardized JSON response based on JSend specification

  Sources   Download

MIT

by Avatar Browomir

json response class jsend

06/11 2015

1.0.0

1.0.0.0

Simple class to prepare standardized JSON response based on JSend specification

  Sources   Download

MIT

by Avatar Browomir

json response class jsend