This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
phptsmadmin/includes/kohana/system/classes/Kohana/Model.php
2012-11-22 14:25:06 +11:00

30 lines
609 B
PHP

<?php defined('SYSPATH') OR die('No direct script access.');
/**
* Model base class. All models should extend this class.
*
* @package Kohana
* @category Models
* @author Kohana Team
* @copyright (c) 2008-2012 Kohana Team
* @license http://kohanaframework.org/license
*/
abstract class Kohana_Model {
/**
* Create a new model instance.
*
* $model = Model::factory($name);
*
* @param string $name model name
* @return Model
*/
public static function factory($name)
{
// Add the model prefix
$class = 'Model_'.$name;
return new $class;
}
} // End Model