Updated Readme with some basic information
This commit is contained in:
parent
3fdfec38c0
commit
343d390377
38
README.md
38
README.md
@ -37,3 +37,41 @@ miniMVC is a minimalistic Modular MVC framework, with built-in minifier, and pur
|
||||
* views - module-specific views
|
||||
|
||||
* 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.
|
Loading…
Reference in New Issue
Block a user