PHPackages                             davidfricker/restapi - 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. [Framework](/categories/framework)
4. /
5. davidfricker/restapi

ActiveLibrary[Framework](/categories/framework)

davidfricker/restapi
====================

Simple OOP MVC PHP REST API Framework

2.2(9y ago)1371[2 PRs](https://github.com/DavidFricker/OOP-MVC-PHP-REST-API-Framework/pulls)MITPHP ^5.3.3 || ^7.0

Since Feb 9Pushed 9y ago1 watchersCompare

[ Source](https://github.com/DavidFricker/OOP-MVC-PHP-REST-API-Framework)[ Packagist](https://packagist.org/packages/davidfricker/restapi)[ RSS](/packages/davidfricker-restapi/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (9)Dependencies (2)Versions (11)Used By (0)

Simple OOP MVC PHP REST API Framework
=====================================

[](#simple-oop-mvc-php-rest-api-framework)

That's a lot of acronyms.

NB: This is a draft document

There is nothing especially ground breaking about this API Framework. It was born from my second year computer science project and has evolved and been re-thought into what you see before you today.

It's key selling point is how lightweight and simple to use, extend and understand it is.

How does it work?
-----------------

[](#how-does-it-work)

Put simply, the framework will route requests to the correct controller and model. It will do this by analysing request URI for the controller name and the request type (be it POST, PUT, GET, etc.). It will then do some sanity checks, before initialising a new controller and model object and calling the correct method on the controller.

### How do I add an end point?

[](#how-do-i-add-an-end-point)

You must create a new controller, in the `controllers` folder. This new controller must extend `AbstractController`. In addition, you must also create a corresponding `model` and place it in the `models` folder. The new model must extend `AbstractController`.

### How do I add resource?

[](#how-do-i-add-resource)

Let us take the example of an API that exposes the account email address for update. We would expect it to be formatted in the following way, PUT `/accounts/email`. To create this one must first create an accounts controller and model. the controller must then declare a method in the following format `public function put_email(){}`. inside this method the developer can then access the `request` object from the controller object itself `$this->request->get_parameter('new_address');`. Since this endpoint will likely (hopefully) require authentication a call to the member function `is_authorised` should be performed.

### Important info

[](#important-info)

Included is a .htaccess file. It simply redirects all requests to the index file. if you are not running apache as your webserver you will need to redirect all traffic to `/index.php/$1` where $1 is the rest of the URI.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity64

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

9

Last Release

3366d ago

Major Versions

1.2 → 2.12017-02-19

1.7 → 2.22017-02-24

### Community

Maintainers

![](https://www.gravatar.com/avatar/1b261da4583f1c88fcf9d392ba06c680083a0420c077ce954ec8d0c20d4f398c?d=identicon)[sousdev](/maintainers/sousdev)

---

Top Contributors

[![DavidFricker](https://avatars.githubusercontent.com/u/6656039?v=4)](https://github.com/DavidFricker "DavidFricker (5 commits)")

### Embed Badge

![Health badge](/badges/davidfricker-restapi/health.svg)

```
[![Health](https://phpackages.com/badges/davidfricker-restapi/health.svg)](https://phpackages.com/packages/davidfricker-restapi)
```

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M192](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)

PHPackages © 2026

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