Init ci
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
class Model {
|
||||
|
||||
protected $db;
|
||||
|
||||
public function __construct() {
|
||||
$this->db = Db::getInstance();
|
||||
}
|
||||
|
||||
public static function factory($package, $model) {
|
||||
require_once ROOT_DIR .'/app/'. $package .'/models/'. $model .'.class.php';
|
||||
$class_name = ucfirst($package) .'_'. $model .'Model';
|
||||
return new $class_name();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user