48 lines
887 B
PHP
48 lines
887 B
PHP
<?php
|
|
/**
|
|
* MiniMVC
|
|
*
|
|
* Convention-based micro-framework for PHP
|
|
*
|
|
* @package miniMVC
|
|
* @author Timothy J. Warren
|
|
* @copyright Copyright (c) 2011 - 2012
|
|
* @link https://github.com/timw4mail/miniMVC
|
|
* @license http://philsturgeon.co.uk/code/dbad-license
|
|
*/
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
/**
|
|
* Base Model Class
|
|
*
|
|
* @package miniMVC
|
|
* @subpackage System
|
|
*/
|
|
class MM_Model extends miniMVC {
|
|
|
|
/**
|
|
* Initialize the model class
|
|
*
|
|
* @return void
|
|
*/
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
}
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
/**
|
|
* Adds the database class to the current model class
|
|
*
|
|
* @param string $name
|
|
* @return void
|
|
*/
|
|
public function load_db($name="default")
|
|
{
|
|
$this->db =& db::get_instance($name);
|
|
}
|
|
|
|
}
|
|
// End of model.php
|