PHPackages                             njcannington/my-mvc - 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. njcannington/my-mvc

ActiveLibrary

njcannington/my-mvc
===================

v0.0.1(7y ago)1141[2 issues](https://github.com/njcannington/my-mvc/issues)PHP

Since May 24Pushed 7y ago1 watchersCompare

[ Source](https://github.com/njcannington/my-mvc)[ Packagist](https://packagist.org/packages/njcannington/my-mvc)[ RSS](/packages/njcannington-my-mvc/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)DependenciesVersions (3)Used By (0)

Custom MVC
==========

[](#custom-mvc)

In order to gain a better understanding of how the MVC framework operates. I wanted to build one from scratch.

Usage
-----

[](#usage)

### Routing

[](#routing)

Within the web/index.php file, all routing is handled with `$route->add()`. You just need to specify the uri, controller, and action.

eg: ` $route->add("/", "index", "index")`

This ensures the home page is routed to the IndexController and returns the indexAction method.

### Controllers

[](#controllers)

All controllers should stored in the App\\Controllers namespace (and directory), using the syntax {Uppercasename}Controller (eg. `IndexController`). However the file itself should be all lowercase (eg. `indexcontroller.php`)

The action within the controller uses the syntax {lowercasename}Action (eg. `indexAction`)

### Views

[](#views)

Set the view within an action using `setView()` method. (eg. `$this->setView("/login"))`). All view files are lowercase and stored in the app\\views directory.

Setup
-----

[](#setup)

### Tested with:

[](#tested-with)

1. **PHP 5.6 - PHP 7.2**
2. **Apache 2.4.\***
    - needed modules:
        - mod\_rewrite
    - set AllowOverride to All
    - point the DocumentRoot to the /web directory within project
3. **MySQL 5.7.20**

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity54

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2908d ago

### Community

Maintainers

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

---

Top Contributors

[![njcannington](https://avatars.githubusercontent.com/u/8861048?v=4)](https://github.com/njcannington "njcannington (27 commits)")

### Embed Badge

![Health badge](/badges/njcannington-my-mvc/health.svg)

```
[![Health](https://phpackages.com/badges/njcannington-my-mvc/health.svg)](https://phpackages.com/packages/njcannington-my-mvc)
```

PHPackages © 2026

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