PHPackages                             scandio/lmvc - 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. scandio/lmvc

AbandonedArchivedLibrary[Framework](/categories/framework)

scandio/lmvc
============

LMVC is an easy-to-use and extensible PHP (5.4) MVC framework

0.4.3(12y ago)34021[1 issues](https://github.com/scandio/lmvc/issues)MITPHPPHP &gt;=5.3

Since Mar 25Pushed 12y ago20 watchersCompare

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

READMEChangelogDependenciesVersions (10)Used By (0)

LMVC (cool)
===========

[](#lmvc-cool)

Lean Model View Controller
--------------------------

[](#lean-model-view-controller)

This project contains a very small MVC framework written with simple PHP classes. It's not for production use but for learning purpose. It's developed with the following boundary conditions:

- Just PHP - no external PHP libraries
- Convention over configuration
- No annotations or other stuff like that
- PSR-0 standard

Currently there is no documentation for anything.

How To
------

[](#how-to)

You have to change the .htaccess file if you want to try it

```
RewriteRule ^(.*)$ /path/to/your/index.php?app-slug=$1 [L,QSA]

```

### Controllers and actions

[](#controllers-and-actions)

```
http:://host/base-path/controller/action/param1/param2

```

The URL above shows the controller &amp; action with theirs params

```
http:://host/base-path/

```

is a special controller and a special action. In this case the controller is named Application and the action index()

```
http:://host/base_path/xyz

```

Here the controller is Xyz and the action is index()

```
http:://host/base_path/xyz/do

```

Again the controller is Xyz and the action is do()

To develop your own controller create a file with the same name like the class in the controllers directory

```
e.g. Accounts.php

```

Create a class as a descendant of class Controller

```
class Accounts extends \Scandio\lmvc\framework\Controller { }

```

Create a public static method named like the action you want to call

```
class Accounts extends \Scandio\lmvc\framework\Controller {

    public static function index() {
        print_r('ok');
    }

}

```

Try to call

```
http://host/base-path/accounts/

```

### Rendering views

[](#rendering-views)

Currently LMVC supports two rendering options. First the standard HTML rendering. Second the JSON output. The class Controller is having two static methods for that. All data that have to be passed to the template or to JSON must be set by setRenderArg().

Example for HTML rendering:

```
class Accounts extends Controller {

    public static function index() {
        return self::render()
    }

}

```

This renders the view (template) registeredViewPaths/controller/action.html. In this case views/accounts/index.html. To pass some data to the template you can...

```
class Accounts extends \Scandio\lmvc\framework\Controller {

    public static function index() {
        self::setRenderArg('name', 'John Doe');
        return self::render()
    }

}

```

or

```
class Accounts extends Controller {

    public static function index() {
        self::render(array('name' => 'John Doe'));
    }

}

```

or both. There is no specific template language. It's just PHP. Every render argument is accessible as a local variable.

```
Hello

```

Example for JSON rendering

```
class Accounts extends \Scandio\lmvc\framework\Controller {

    public static function index() {
        self::renderJson(array('name' => 'John Doe'));
    }

}

```

has an output like

```
{"name": "John Doe"}

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 72% 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 ~51 days

Total

5

Last Release

4583d ago

### Community

Maintainers

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

---

Top Contributors

[![chriskoch](https://avatars.githubusercontent.com/u/242259?v=4)](https://github.com/chriskoch "chriskoch (118 commits)")[![Pr0gm4n](https://avatars.githubusercontent.com/u/1556701?v=4)](https://github.com/Pr0gm4n "Pr0gm4n (46 commits)")

---

Tags

phplibrarymvcscandio

### Embed Badge

![Health badge](/badges/scandio-lmvc/health.svg)

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

PHPackages © 2026

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