Modules

abstract Kohana_Model

This class is a transparent base class for Model and should not be accessed directly.

Model base class. All models should extend this class.

package
Kohana
category
Models
author
Kohana Team
copyright
© 2008-2012 Kohana Team
license
https://kohana.top/license

Class declared in SYSPATH/classes/Kohana/Model.php on line 12.

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