CodeIgniter框架源码学习之模型类--Model.php
来源:互联网 发布:a星算法的缺点 编辑:程序博客网 时间:2024/05/27 00:43
文件位置:./system/core/Model.php
<?php
/**
* CodeIgniter
*
* An open source application development framework for PHP
*
* This content is released under the MIT License (MIT)
*
* Copyright (c) 2014 - 2017, British Columbia Institute of Technology
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* @package CodeIgniter
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
* @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/)
* @license http://opensource.org/licenses/MIT MIT License
* @link https://codeigniter.com
* @since Version 1.0.0
* @filesource
*/
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* Model Class
*
* @package CodeIgniter
* @subpackage Libraries
* @category Libraries
* @author EllisLab Dev Team
* @link https://codeigniter.com/user_guide/libraries/config.html
*/
class CI_Model {
/**
* Class constructor
*
* @return void
*/
public function __construct()
{
log_message('info', 'Model Class Initialized');
}
// --------------------------------------------------------------------
/**
* __get magic
*
* Allows models to access CI's loaded classes using the same
* syntax(语句) as controllers.
*
* @param string $key
*/
public function __get($key)
{
// Debugging note:
// If you're here because you're getting an error message
// saying 'Undefined Property: system/core/Model.php', it's
// most likely a typo(排印错误) in your model code.
return get_instance()->$key;
}
}
阅读全文
0 0
- CodeIgniter框架源码学习之模型类--Model.php
- CodeIgniter框架源码学习之框架初始化文件--CodeIgniter.php
- CodeIgniter框架源码学习之基准测试类--Benchmake.php
- CodeIgniter框架源码学习之钩子类--Hooks.php
- CodeIgniter框架源码学习之配置类--Config.php
- CodeIgniter框架源码学习之utf-8编码的环境支持类--Utf8.php
- CodeIgniter框架源码学习之uri类--URI.php
- CodeIgniter框架源码学习之路由类--Router.php
- CodeIgniter框架源码学习之输出类--Output.php
- CodeIgniter框架源码学习之安全类--Security.php
- CodeIgniter框架源码学习之输入类-- Input.php
- CodeIgniter框架源码学习之语言类--Lang.php
- CodeIgniter框架源码学习之控制器类--Controller.php
- CodeIgniter框架源码学习之加载类--Loader.php
- CodeIgniter框架源码学习之异常类--Exceptions.php
- CodeIgniter框架源码学习之日志类--Log.php
- CodeIgniter框架源码学习之数据库类--DB.php
- CodeIgniter框架源码学习之框架入口文件--index.php
- 3208: 花神的秒题计划Ⅰ
- eclipse中获得程序执行的所用时间
- Unit3d开发 (二十一) 更改Apk的smali 排查Java层问题
- H.264与H.265的主要差异
- MySQL创建删除账号密码和重启命令
- CodeIgniter框架源码学习之模型类--Model.php
- shader ZTest ZWrite Early-z
- ORC资源
- 十大Intellij IDEA快捷键
- java bean中空的构造方法和有参数的构造方法意义
- oracle中事务处理
- java 获取某年某月有多少天
- mybatis+mysql8.0.7配置文件mybatis_config.xml
- JAVA的反射机制