PHPackages                             filarichard/mmf\_skeleton - 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/mmf\_skeleton

ActiveProject[Framework](/categories/framework)

filarichard/mmf\_skeleton
=========================

Full implementation of MVC Micro Framework

03(6y ago)03MITHTML

Since Jul 22Pushed 6y agoCompare

[ Source](https://github.com/filarichard/MMF_skeleton)[ Packagist](https://packagist.org/packages/filarichard/mmf_skeleton)[ RSS](/packages/filarichard-mmf-skeleton/feed)WikiDiscussions master Synced today

READMEChangelog (5)Dependencies (1)Versions (7)Used By (0)

MMF\_skeleton
=============

[](#mmf_skeleton)

### Full implementation of MVC Micro Framework

[](#full-implementation-of-mvc-micro-framework)

MMF\_skeleton is project, that shows how to implement 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);
```

SQL
---

[](#sql)

```
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Počítač: 127.0.0.1
-- Vytvořeno: Čtv 22. srp 2019, 11:18
-- Verze serveru: 10.1.38-MariaDB
-- Verze PHP: 7.3.2

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Databáze: `test`
--

-- --------------------------------------------------------

--
-- Struktura tabulky `segments`
--

CREATE TABLE `segments` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `title` varchar(255) DEFAULT NULL,
  `subtitle` varchar(255) DEFAULT NULL,
  `content` varchar(3000) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Vypisuji data pro tabulku `segments`
--

INSERT INTO `segments` (`id`, `name`, `title`, `subtitle`, `content`) VALUES
(2, 'template1', 'Template', 'MVC View', 'View functionality in our MVC Micro Framework is backed by the Template class (Template View design pattern). When creating a view, the variable name will be placed in curly brackets where we want to display values from the logical part of the application. For example {value}. These values must be correctly assigned in the controller.'),
(3, 'template2', NULL, 'Inserting values', 'Each segment on these example pages contains a paragraph or a first and second order heading. A template system is used on this page replacing the Template tags with associated values.');

--
-- Klíče pro exportované tabulky
--

--
-- Klíče pro tabulku `segments`
--
ALTER TABLE `segments`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT pro tabulky
--

--
-- AUTO_INCREMENT pro tabulku `segments`
--
ALTER TABLE `segments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
```

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)

Packagist
---------

[](#packagist)

License
-------

[](#license)

Flight is released under the MIT license.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity63

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 ~3 days

Total

6

Last Release

2469d 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 (11 commits)")

### Embed Badge

![Health badge](/badges/filarichard-mmf-skeleton/health.svg)

```
[![Health](https://phpackages.com/badges/filarichard-mmf-skeleton/health.svg)](https://phpackages.com/packages/filarichard-mmf-skeleton)
```

###  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)
