Updated Readme with some basic information

This commit is contained in:
Timothy Warren 2012-01-09 10:59:02 -05:00
parent 3fdfec38c0
commit 343d390377
1 changed files with 39 additions and 1 deletions

View File

@ -36,4 +36,42 @@ miniMVC is a minimalistic Modular MVC framework, with built-in minifier, and pur
* models - model classes
* views - module-specific views
* sys - core framework classes
* sys - core framework classes
### Common Tasks
* Creating a controller
<?php
class Foo extends MM_Controller {
function __construct()
{
parent::__construct();
}
}
* Creating a model
<?php
class Bar extends MM_Model {
function __construct()
{
parent::__construct();
}
}
* Loading a database (From a Model)
`$this->db = db::get_instance($db_name);`
Note that multiple databases can be used in the same class
by specifying a different database name.
* Loading a model (From a controller)
`$this->load_model($model)`
#### Disclaimer
Please treat this as alpha-level code. Structure might change, classes might appear or disappear overnight.