Files
gallery3/kohana/libraries/Model.php
2009-03-04 18:15:56 +00:00

31 lines
584 B
PHP

<?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 = '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