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.
redir/includes/kohana/system/classes/Kohana/Model.php

30 lines
609 B
PHP
Raw Normal View History

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