PHPackages                             fatkulnurk/microframework - 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. fatkulnurk/microframework

ActiveProject[Framework](/categories/framework)

fatkulnurk/microframework
=========================

php microframework

v0.1.4(6y ago)27PHPPHP ^7.2CI failing

Since Oct 10Pushed 5y ago1 watchersCompare

[ Source](https://github.com/fatkulnurk/microframework)[ Packagist](https://packagist.org/packages/fatkulnurk/microframework)[ RSS](/packages/fatkulnurk-microframework/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (14)Versions (9)Used By (0)

MICROFRAMEWORK
==============

[](#microframework)

[![StyleCI](https://camo.githubusercontent.com/2acab55fdd7ae710daa6e6e2d0db6db2fba2d3035ff973e4d32ea1aa28e6a5b0/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3231303530353936352f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/210505965)[![Build Status](https://camo.githubusercontent.com/0bcf4c18ec4b4290584392f831bb5ca4efe1be2056b1a495b0b1e9cdfeab8c3b/68747470733a2f2f7472617669732d63692e6f72672f6661746b756c6e75726b2f6d6963726f6672616d65776f726b2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/fatkulnurk/microframework)[![CodeFactor](https://camo.githubusercontent.com/9ff37724a323df52f14269c366ecff569c3ba2480e1acd481102f0ef105fd994/68747470733a2f2f7777772e636f6465666163746f722e696f2f7265706f7369746f72792f6769746875622f6661746b756c6e75726b2f6d6963726f6672616d65776f726b2f6261646765)](https://www.codefactor.io/repository/github/fatkulnurk/microframework)[![Latest Stable Version](https://camo.githubusercontent.com/95a467b13963044c752f0becf80dd4cdfd6baddb495bd04ed3d73e57aab54c0d/68747470733a2f2f706f7365722e707567782e6f72672f6661746b756c6e75726b2f6d6963726f6672616d65776f726b2f762f737461626c65)](https://packagist.org/packages/fatkulnurk/microframework)[![Total Downloads](https://camo.githubusercontent.com/7d7eddc84ce3a130e5647870a52ee6694c8d974bbc929d04bd6a787a1fae5a9c/68747470733a2f2f706f7365722e707567782e6f72672f6661746b756c6e75726b2f6d6963726f6672616d65776f726b2f646f776e6c6f616473)](https://packagist.org/packages/fatkulnurk/microframework)[![Latest Unstable Version](https://camo.githubusercontent.com/c719751531b6038b819fba9a48cadefa5fe406e6f70e51ff3b1c57707a98eb28/68747470733a2f2f706f7365722e707567782e6f72672f6661746b756c6e75726b2f6d6963726f6672616d65776f726b2f762f756e737461626c65)](https://packagist.org/packages/fatkulnurk/microframework)

PHP Microframework

Baca dokumentasi selengkapnya \[link belum ada\].

---

Cara Install
------------

[](#cara-install)

gunakan composer, lalu jalankan perintah dibawah ini (pastikan sudah install composer)

```
composer create-project --prefer-dist fatkulnurk/microframework nama_aplikasi

```

---

**Mendaftarkan Routing**

Pendaftaran Routing

contoh pendaftaran routing beserta implementasinya, contoh dibawah ini untuk return berupa xml.

```
use Fatkulnurk\Microframework\Routing\RouteCollector;

return function (RouteCollector $r) {
    $r->addRoute('GET', '/tes-json', function ($args) {
        $data = [
            'biodata' => [
                'nama' => 'fatkul nur koirudin',
                'ttl' => 'Lamongan, 18 Januari 1999',
                'alamat' => [
                    'desa' => 'Desa Ngambeg',
                    'kecamatan' => 'Kecamatan Pucuk',
                    'kabupaten' => 'Kabupaten Lamongan'
                ],
                'email' => 'fatkulnurk@gmail.com',
                'hoby' => [
                    'memancing',
                    'belajar hal baru'
                ]
            ]
        ];

        return Response::getInstance()
            ->withXml($data);
    });
};

```

Routing Handler Berupa Callback

dibawah ini contoh routing dengan callback.

```
    $r->addRoute('GET', '/', function ($args) {
        return Response::getInstance()
            ->withView('index', [
                'name' => 'fatkul nur k',
                'birthday' => '18 januari 1999'
            ]);
    });

```

Routing Dengan handler berupa class

dibawah ini contoh routing dengan handler berupa method dari suatu class. perlu di ingat, untuk pemanggilan adalah NamaClass::NamaMethod

```
    $r->addRoute('GET', '/test/{name}', 'Coba::index');

```

Buat class sebagai handlernya, contohnya dibawah ini.

```
class Coba {
    public function index()
    {
        echo "Hello World";
    }
}

```

Response
--------

[](#response)

method yang bisa digunakan untuk response sama dengan yang ada pada aturan PSR 7.

untuk method tambahan adalah sebagai berikut:

- withView()
- withJson()
- withXml()
- withRedirect()
- withDownload()

Request
-------

[](#request)

semua sama seperti PSR 7. Gunakan seperti di framework lain.

---

**Cek CodeStyle**

Standard yang digunakan adalah PSR2, untuk menjalankan ketikan command berikut.

`phpcs ./system --standard=psr2`

---

**DocBlock**Jalankan `u`

---

**Tool**

- PHP\_CodeSniffer (phpcs &amp; phpcbf), cara integrasi dengan phpstorm --&gt;
- styleci
- travis-ci
- Github - Repository kode

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

Recently: every ~25 days

Total

6

Last Release

2213d ago

### Community

Maintainers

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

---

Top Contributors

[![fatkulnurk](https://avatars.githubusercontent.com/u/12779618?v=4)](https://github.com/fatkulnurk "fatkulnurk (90 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/fatkulnurk-microframework/health.svg)

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

###  Alternatives

[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[contao/core-bundle

Contao Open Source CMS

1231.6M2.3k](/packages/contao-core-bundle)[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)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M385](/packages/shopware-core)[aimeos/aimeos-core

Full-featured e-commerce components for high performance online shops

4.5k346.9k46](/packages/aimeos-aimeos-core)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)

PHPackages © 2026

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