blob: 9bc9f879f46d88f26344dfc8bc0755a1a94278fd [file] [log] [blame]
Andrey Andreev64e98aa2012-01-07 20:29:10 +02001<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
Derek Allard2067d1a2008-11-13 22:59:24 +00002/**
3 * CodeIgniter
4 *
Phil Sturgeon07c1ac82012-03-09 17:03:37 +00005 * An open source application development framework for PHP 5.2.4 or newer
Derek Allard2067d1a2008-11-13 22:59:24 +00006 *
Derek Jonesf4a4bd82011-10-20 12:18:42 -05007 * NOTICE OF LICENSE
Andrey Andreev64e98aa2012-01-07 20:29:10 +02008 *
Derek Jonesf4a4bd82011-10-20 12:18:42 -05009 * Licensed under the Open Software License version 3.0
Andrey Andreev64e98aa2012-01-07 20:29:10 +020010 *
Derek Jonesf4a4bd82011-10-20 12:18:42 -050011 * This source file is subject to the Open Software License (OSL 3.0) that is
12 * bundled with this package in the files license.txt / license.rst. It is
13 * also available through the world wide web at this URL:
14 * http://opensource.org/licenses/OSL-3.0
15 * If you did not receive a copy of the license and are unable to obtain it
16 * through the world wide web, please send an email to
17 * licensing@ellislab.com so we can send you a copy immediately.
18 *
Derek Allard2067d1a2008-11-13 22:59:24 +000019 * @package CodeIgniter
Derek Jonesf4a4bd82011-10-20 12:18:42 -050020 * @author EllisLab Dev Team
Greg Aker0defe5d2012-01-01 18:46:41 -060021 * @copyright Copyright (c) 2008 - 2012, EllisLab, Inc. (http://ellislab.com/)
Derek Jonesf4a4bd82011-10-20 12:18:42 -050022 * @license http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
Derek Allard2067d1a2008-11-13 22:59:24 +000023 * @link http://codeigniter.com
24 * @since Version 1.0
25 * @filesource
26 */
27
Derek Allard2067d1a2008-11-13 22:59:24 +000028/**
29 * CodeIgniter Model Class
30 *
31 * @package CodeIgniter
32 * @subpackage Libraries
33 * @category Libraries
Derek Jonesf4a4bd82011-10-20 12:18:42 -050034 * @author EllisLab Dev Team
Derek Allard2067d1a2008-11-13 22:59:24 +000035 * @link http://codeigniter.com/user_guide/libraries/config.html
36 */
Derek Jones8eae4d72010-03-02 13:47:19 -060037class CI_Model {
Derek Allard2067d1a2008-11-13 22:59:24 +000038
Timothy Warrenad475052012-04-19 13:21:06 -040039 /**
40 * Initialize CI_Model Class
Andrey Andreev92ebfb62012-05-17 12:49:24 +030041 *
42 * @return void
Timothy Warrenad475052012-04-19 13:21:06 -040043 */
Andrey Andreev64e98aa2012-01-07 20:29:10 +020044 public function __construct()
Derek Allard2067d1a2008-11-13 22:59:24 +000045 {
Andrey Andreev88d03c42012-01-07 21:59:00 +020046 log_message('debug', 'Model Class Initialized');
Derek Allard2067d1a2008-11-13 22:59:24 +000047 }
48
49 /**
Pascal Kriete287781e2010-11-10 15:43:49 -050050 * __get
Derek Allard2067d1a2008-11-13 22:59:24 +000051 *
Pascal Kriete287781e2010-11-10 15:43:49 -050052 * Allows models to access CI's loaded classes using the same
53 * syntax as controllers.
Derek Allard2067d1a2008-11-13 22:59:24 +000054 *
David Behlercda768a2011-08-14 23:52:48 +020055 * @param string
Barry Mienydd671972010-10-04 16:33:58 +020056 */
Andrey Andreev64e98aa2012-01-07 20:29:10 +020057 public function __get($key)
Derek Allard2067d1a2008-11-13 22:59:24 +000058 {
Barry Mienydd671972010-10-04 16:33:58 +020059 $CI =& get_instance();
Pascal Kriete287781e2010-11-10 15:43:49 -050060 return $CI->$key;
Derek Allard2067d1a2008-11-13 22:59:24 +000061 }
Andrey Andreev92ebfb62012-05-17 12:49:24 +030062
Derek Allard2067d1a2008-11-13 22:59:24 +000063}
Derek Allard2067d1a2008-11-13 22:59:24 +000064
65/* End of file Model.php */
Timothy Warren40403d22012-04-19 16:38:50 -040066/* Location: ./system/core/Model.php */