Modules

abstract Kohana_Model

Model base class. All models should extend this class.

package
Kohana
category
Models
author
Kohana Team
copyright
© 2008-2012 Kohana Team
license
http://kohanaframework.org/license

Class declared in SYSPATH/classes/kohana/model.php on line 11.

Constants

  • None

Properties

  • None

Methods

Methods

public static factory( string $name ) (defined in Kohana_Model)

Create a new model instance.

$model = Model::factory($name);

Parameters

  • string $name required - Model name

Return Values

  • Model

Source Code

public static function factory($name)
{
	// Add the model prefix
	$class = 'Model_'.$name;

	return new $class;
}