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