PHPackages                             professorhaseeb/smart-output - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. professorhaseeb/smart-output

ActiveLibrary[API Development](/categories/api)

professorhaseeb/smart-output
============================

Smart Output for RESTful PHP APIs

14PHP

Since Feb 6Pushed 9y ago1 watchersCompare

[ Source](https://github.com/professorhaseeb/smartOutput)[ Packagist](https://packagist.org/packages/professorhaseeb/smart-output)[ RSS](/packages/professorhaseeb-smart-output/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Smart Output - [![Build Status](https://camo.githubusercontent.com/d3de82a332807a08e8ae257bc614a4cbd6235928afe022a8abdaa62a99032eb6/68747470733a2f2f7472617669732d63692e6f72672f70726f666573736f726861736565622f736d6172744f75747075742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/professorhaseeb/smartOutput)
===============================================================================================================================================================================================================================================================================================================================

[](#smart-output---)

\##Installation

```
composer require professorhaseeb/smart-output

```

\##Usage

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

Setting Response:

```
//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:

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

Output:

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

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1492888?v=4)[Haseeb ur Rehman](/maintainers/professorhaseeb)[@professorhaseeb](https://github.com/professorhaseeb)

---

Top Contributors

[![professorhaseeb](https://avatars.githubusercontent.com/u/1492888?v=4)](https://github.com/professorhaseeb "professorhaseeb (34 commits)")

---

Tags

apiapi-responseresponserestrest-apirestfulrestful-api

### Embed Badge

![Health badge](/badges/professorhaseeb-smart-output/health.svg)

```
[![Health](https://phpackages.com/badges/professorhaseeb-smart-output/health.svg)](https://phpackages.com/packages/professorhaseeb-smart-output)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
