phpMMVC - a minimalist MVC framework for PHP

PHP Minimalist Model View Controller (phpMMVC) is a minimalist, lightweight implementation of MVC for PHP. Unlike most PHP frameworks, phpMMVC does nothing more than provide a controller which facilitates easily implementing extension-less URLs (also called pretty URLs) in your application, leaving you free to implement your models and (optionally, but recommended) views however you like. There is no enforced directory structure and no giant framework-specific library of classes and methods to learn. Simply stated, this framework will not get in the way of you developing your application because it is designed to have a learning curve approaching as close to zero as possible.

Download

The download contains both the source code of phpMMVC and the source code for the sample application.

File/directory structure provided

The following file/directory structure is included in the source code by default. You may rearrange the directories whichever way you like. However, if you decide to put your models somewhere other than php/models/, then you must change $_CONTROLLER['MODELS_PATH'] accordingly in controller.php.

Variables provided by controller.php

The controller.php provides an array called $_CONTROLLER which has the following elements.

Settings in controller.php

The $_CONTROLLER array also stores controller settings whose defaults can be changed at the top of the controller.php's source.

Live demo

You can view a live demo sample application running on phpMMVC on my server here. The source code for the sample application is included with the download above.

Dependencies

The controller.php's corresponding .htaccess file is designed to work solely with Apache Web Server with mod_rewrite enabled.

Changelog

Licensing

Creative Commons License phpMMVC is licensed under the Creative Commons Attribution 3.0 United States License. You are permitted to redistribute and/or modify this work for commercial or noncommercial purposes provided proper attribution to the original author (me) is present in the redistribution.