Modules

abstract Model
extends Kohana_Model

Model base class. All models should extend this class.

package
Kohana
category
Models
author
Kohana Team
copyright
© Kohana Team
license
https://koseven.ga/LICENSE.md

Class declared in SYSPATH/classes/Model.php on line 3.

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;
}