Mass move to root

This commit is contained in:
magnolia-fan
2011-04-09 17:41:24 +04:00
parent 0640e2424e
commit 62ff3f277f
484 changed files with 0 additions and 3 deletions
+18
View File
@@ -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();
}
}
?>