<?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();
	}
}

?>