blob: 0c9fd8d6c43f68ef6adb63967aecbcd2e46bb89d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
<?php defined('SYSPATH') OR die('No direct access allowed.');
/**
* Model base class.
*
* $Id: Model.php 4007 2009-02-20 01:54:00Z jheathco $
*
* @package Core
* @author Kohana Team
* @copyright (c) 2007-2009 Kohana Team
* @license http://kohanaphp.com/license.html
*/
class Model_Core {
// Database object
protected $db = 'default';
/**
* Loads the database instance, if the database is not already loaded.
*
* @return void
*/
public function __construct()
{
if ( ! is_object($this->db))
{
// Load the default database
$this->db = Database::instance($this->db);
}
}
} // End Model
|