PHPackages                             jsnlib/rest\_controller - 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. jsnlib/rest\_controller

ActiveLibrary[API Development](/categories/api)

jsnlib/rest\_controller
=======================

1.1.3(8y ago)0531MITPHP

Since Jul 26Pushed 8y agoCompare

[ Source](https://github.com/fdjkgh580/jsnlib-rest_controller)[ Packagist](https://packagist.org/packages/jsnlib/rest_controller)[ RSS](/packages/jsnlib-rest-controller/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (9)Used By (1)

rest\_controller
================

[](#rest_controller)

1. 先安裝 chriskacerguis/codeigniter-restserver
2. 接著再使用如

```
class MY_APP_Controller extends \Jsnlib\Codeigniter\REST_Controller
{
    // 一些共用程式碼
}
```

```
class User extends MY_APP_Controller
{
    function __construct()
    {
        parent::__construct();
    }

    public function index()
    {

    }
}
```

3. 可以使用的方法

```
// 若成功，不使用 $data 參數，會自動使用 ['status' => true]
$result = \Jsnlib\Codeigniter\REST_Controller::success($data = false);
parent::respary($result);

// 若失敗
return \Jsnlib\Codeigniter\REST_Controller::error($code, $message, $data = false);
parent::respary($result);
```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity68

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~2 days

Total

8

Last Release

3247d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b4161e8ee5212efdcdaa6a42183109f397f25c852655ec4b73cce9920cf94f2a?d=identicon)[fdjkgh580](/maintainers/fdjkgh580)

---

Top Contributors

[![fdjkgh580-2](https://avatars.githubusercontent.com/u/60056647?v=4)](https://github.com/fdjkgh580-2 "fdjkgh580-2 (14 commits)")

### Embed Badge

![Health badge](/badges/jsnlib-rest-controller/health.svg)

```
[![Health](https://phpackages.com/badges/jsnlib-rest-controller/health.svg)](https://phpackages.com/packages/jsnlib-rest-controller)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

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

Hubspot API client

24016.2M19](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k12](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

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

PHPackages © 2026

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