Updated Readme with some basic information
This commit is contained in:
parent
3fdfec38c0
commit
343d390377
40
README.md
40
README.md
@ -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.
|
Loading…
Reference in New Issue
Block a user