Go to file
Timothy Warren 656fc8cba0 Some DB fixes and error handling improvements 2012-01-04 19:47:32 -05:00
app Some DB fixes and error handling improvements 2012-01-04 19:47:32 -05:00
assets Fixed object inheritence, changed config to be based more on constants 2011-12-29 10:31:04 -05:00
modules/welcome Various improvements 2012-01-03 16:36:46 -05:00
sys Some DB fixes and error handling improvements 2012-01-04 19:47:32 -05:00
README.md More descriptive README 2011-12-30 17:43:53 -05:00
index.php Some DB fixes and error handling improvements 2012-01-04 19:47:32 -05:00

README.md

miniMVC

miniMVC is a minimalistic Modular MVC framework, with built-in minifier, and pure-PHP templating system.

Unique features

Extensive use of PHP's magic methods on the base class

  • __toString() method allows a view of the current class object when the current class object is used as a string. If you prefer var_dump() or var_export(), you can pass the name of that function if you call the __toString method directly.

    Eg. $this . "string", $this->__toString(), echo $this;

  • __call() method allows (in PHP 5.3+) the dynamic addition of callable closure objects

    Eg. $this->foo = function($baz){} is callable as $this->foo(), with the current object as the last argument

Database class is an extension of PHP's PDO class.
  • miniMVC supports any database supported by PDO
  • Database class also implements the __toString method

File Structure

  • index.php - framework frontend

  • app - configuration and app-wide files

    • config - configuration files
    • errors - error page templates
    • views - global page templates
  • assets - frontend files

    • js - javascript files
    • css - css files
    • config - minifier configuration files
  • modules - MVC triads

    • controllers - controller classes
    • models - model classes
    • views - module-specific views
  • sys - core framework classes