2017 © Pedro Peláez
 

library smart-output

Smart Output for RESTful PHP APIs

image

professorhaseeb/smart-output

Smart Output for RESTful PHP APIs

  • Sunday, January 29, 2017
  • by professorhaseeb
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Smart Output - Build Status

Installation

composer require professorhaseeb/smart-output

Usage

// setup class
$so = new smartOutput();

Setting Response:, (*1)

//set response code in first parameter and the response output in the second
$so->setResponse(0,"RESPONSE DATA");
// Array can be passed too
// $arr = ("request" => "true");
// $so->setResponse(0,$arr);

Get Response:, (*2)

echo json_encode($so->getResponse());

Output:, (*3)

{
  "status_code": 0,
  "status": "success",
  "message": "Request successfull",
  "response": "RESPONSE DATA"
}

The Versions

29/01 2017

dev-master

9999999-dev

Smart Output for RESTful PHP APIs

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

output restful smartooutput