blob: 5a87ab1530bf436617b2185bb82a30a4155463cd [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/**
Andrey Andreev3e9d2b82012-10-27 14:28:51 +030029 * Model Class
Derek Allard2067d1a2008-11-13 22:59:24 +000030 *
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 /**
Andrey Andreev3e9d2b82012-10-27 14:28:51 +030040 * Class constructor
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
Andrey Andreev3e9d2b82012-10-27 14:28:51 +030049 // --------------------------------------------------------------------
50
Derek Allard2067d1a2008-11-13 22:59:24 +000051 /**
Andrey Andreev3e9d2b82012-10-27 14:28:51 +030052 * __get magic
Derek Allard2067d1a2008-11-13 22:59:24 +000053 *
Pascal Kriete287781e2010-11-10 15:43:49 -050054 * Allows models to access CI's loaded classes using the same
55 * syntax as controllers.
Derek Allard2067d1a2008-11-13 22:59:24 +000056 *
Andrey Andreev3e9d2b82012-10-27 14:28:51 +030057 * @param string $key
Barry Mienydd671972010-10-04 16:33:58 +020058 */
Andrey Andreev64e98aa2012-01-07 20:29:10 +020059 public function __get($key)
Derek Allard2067d1a2008-11-13 22:59:24 +000060 {
Barry Mienydd671972010-10-04 16:33:58 +020061 $CI =& get_instance();
Pascal Kriete287781e2010-11-10 15:43:49 -050062 return $CI->$key;
Derek Allard2067d1a2008-11-13 22:59:24 +000063 }
Andrey Andreev92ebfb62012-05-17 12:49:24 +030064
Derek Allard2067d1a2008-11-13 22:59:24 +000065}
Derek Allard2067d1a2008-11-13 22:59:24 +000066
67/* End of file Model.php */
Timothy Warren40403d22012-04-19 16:38:50 -040068/* Location: ./system/core/Model.php */