blob: 4134ff2d15d6bd9e11b7e730306622301a92e96b (
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$
*
* @package Core
* @author Kohana Team
* @copyright (c) 2007-2009 Kohana Team
* @license http://kohanaphp.com/license.html
*/
class Model_Core {
// Database object
protected $db;
/**
* 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('default');
}
}
} // End Model
|