/system/core/Modle.php CI模型类

<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
 * CodeIgniter
 *
 * An open source application development framework for PHP 5.1.6 or newer
 *
 * @package		CodeIgniter
 * @author		ExpressionEngine Dev Team
 * @copyright	Copyright (c) 2008 - 2011, EllisLab, Inc.
 * @license		http://codeigniter.com/user_guide/license.html
 * @link		http://codeigniter.com
 * @since		Version 1.0
 * @filesource
 */

// ------------------------------------------------------------------------

/**
 * CodeIgniter Model Class
 * CI 模型类
 * @package		CodeIgniter
 * @subpackage	Libraries
 * @category	Libraries
 * @author		ExpressionEngine Dev Team
 * @link		http://codeigniter.com/user_guide/libraries/config.html
 */
class CI_Model {

	/**
	 * Constructor
	 *
	 * @access public
	 */
	function __construct()
	{
		log_message('debug', "Model Class Initialized 模型类初始化");
	}

	/**
	 * __get
	 *
	 * Allows models to access CI's loaded classes using the same
	 * syntax as controllers.
	 * 允许模型来访问CI的加载的类使用相同的语法控制器。
	 * @param	string
	 * @access private
	 */
	//__get()也就是可以获取类的任何属性值
	function __get($key)
	{
		$CI =& get_instance(); //超级CI类
		return $CI->$key;      //取得CI超级类的指定属性
	}
}
// END Model Class

/* End of file Model.php */
/* Location: ./system/core/Model.php */

  

posted @ 2013-05-13 20:16  简单--生活  阅读(205)  评论(0)    收藏  举报
简单--生活(CSDN)