PHPackages                             filarichard/mvc\_micro\_framework - 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. filarichard/mvc\_micro\_framework

ActiveProject[Framework](/categories/framework)

filarichard/mvc\_micro\_framework
=================================

Simple MVC Micro Framework

0.4(6y ago)051MITPHP

Since Jul 22Pushed 6y agoCompare

[ Source](https://github.com/filarichard/mvc_micro_framework)[ Packagist](https://packagist.org/packages/filarichard/mvc_micro_framework)[ RSS](/packages/filarichard-mvc-micro-framework/feed)WikiDiscussions master Synced today

READMEChangelog (4)Dependencies (4)Versions (5)Used By (1)

mvc\_micro\_framework
=====================

[](#mvc_micro_framework)

### Simple MVC Micro Framework

[](#simple-mvc-micro-framework)

mvc\_micro\_framework is simple and lightweight PHP micro framework, that allows you easy and fast build of MVC applications. It's simple and extensible!

Minimum requires
----------------

[](#minimum-requires)

mvc\_micro\_framework requires `PHP 7.1` or grater.

Installation
------------

[](#installation)

1. Download

**With Composer:**
`composer require filarichard/mvc_micro_framework`

**Without Composer:**
Download files and extract them directly to web directory.

2. Create **App** and call **run** function

```
$application = new \App\App();
$application->run();
```

3. Create **config.json** file in `/config` directory

```
{
  "routes": {
    "/third_parties_components": {
      "controller": "Controllers\\ThirdPartiesController",
      "action": "tpc"
    }
  },
  "modules": [
    "mvc"
  ],
  "diContainer": "config/diContainer.php"
}
```

Possible config values are:

- routes - list of all routes used in the app, that doesn't use modules.
- modules - list of all modules used in the app.
- router - path to PHP fith configured router.
- diContainer - path to PHP fith configured DI Container.
- request - path to PHP fith configured HTTP Request.

Routing
-------

[](#routing)

For fully working routing, use followed directory:

- config
- src
    - config
        - All configuration files for modules
        - modelname.config.json
    - controllers
        - All controllers
        - If defined, use Modul name
            - Modul Controllers
    - models
    - views

For Router setup, you can use on of the following choices:

1. Define routes in **config** file

All routes, that aren't included in modules, create in **config.json** file.
All routes, that are in modules, create in **modulname.config.json** files.

Structure of route definition:

```
"/nameOfRoute": {
    "controller": "Controllers\\NameOfController",
    "action": "nameofFunction"
  }
```

2. Define own **router** with all routes

```
$router = new \MVC\Router();

$router->addRoute(new \MVC\Route("/nameOfRoute", \Controllers\NameOfController::class, "nameOfFunction"));

return $router;
```

Template Engine
---------------

[](#template-engine)

mvc\_micro\_framework have built-in Template Engine. Just follow these few steps:

1. Set template

```
$this->setView();
```

2. Assign variables

```
$this->view->assignValue("nameOfVariable", $value);

$this->view->assignValue("title1", $titleValue);
$this->view->assignValue("subtitle1", $subtitleValue);
$this->view->assignValue("content1", $contentValue);
```

3. Use those variables in **HTML** code

```
{title1}
{subtitle1}

  {content1}

```

4. Render View

```
$this->view->render("pathToFile.html");
```

Function **render** can take second parameter that define if path is full or relative to `/src/views`.

Event Dispatcher
----------------

[](#event-dispatcher)

With following steps, you can use our Event Dispatcher:

1. Create new Dispatcher

```
$this->eventDispatcher = new Dispatcher();
```

2. Create new Event

```
$this->eventName = new Event("eventName");
```

3. Attach him to Listener

```
$this->eventDispatcher->attach($this->eventName, array($this, 'listenerName'));
```

Note: Listener can be any Callable object.

4. Dispatch Event

```
$this->eventDispatcher->dispatch($this->eventName);
```

You can also remove Event

```
$this->eventDispatcher->detach($this->eventName, array($this, 'listenerName'));
```

or stop event propagation

```
$this->eventName->setPropagationStopped(true);
```

Third Parties Components
------------------------

[](#third-parties-components)

mvc\_micro\_framework support following components from third parties:

- HTTP Foundation/Symfony
- Eloquent (ORM)/Laravel
- Pimple (DI Container)
- Monolog (Logger)

License
-------

[](#license)

Flight is released under the MIT license.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

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

Every ~4 days

Total

4

Last Release

2474d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/532ef94e0e7d6fd9cc455dc5118cdbc1b714ebe09998ec57e68aee0ae88a00c6?d=identicon)[richard.fila](/maintainers/richard.fila)

---

Top Contributors

[![filarichard](https://avatars.githubusercontent.com/u/33174462?v=4)](https://github.com/filarichard "filarichard (12 commits)")

### Embed Badge

![Health badge](/badges/filarichard-mvc-micro-framework/health.svg)

```
[![Health](https://phpackages.com/badges/filarichard-mvc-micro-framework/health.svg)](https://phpackages.com/packages/filarichard-mvc-micro-framework)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.6k509.9M17.0k](/packages/laravel-framework)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[silverstripe/framework

The SilverStripe framework

7213.5M2.5k](/packages/silverstripe-framework)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[laravel/nightwatch

The official Laravel Nightwatch package.

3486.1M13](/packages/laravel-nightwatch)[elgg/elgg

Elgg is an award-winning social networking engine, delivering the building blocks that enable businesses, schools, universities and associations to create their own fully-featured social networks and applications.

1.7k15.7k5](/packages/elgg-elgg)

PHPackages © 2026

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