blob: 469663f095f953ddf60eb2982ccfb26747aef6a3 [file] [log] [blame]
Derek Allard2067d1a2008-11-13 22:59:24 +00001<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
2/**
3 * CodeIgniter
4 *
Greg Aker4abfa682010-11-10 14:44:26 -06005 * An open source application development framework for PHP 5.1.6 or newer
Derek Allard2067d1a2008-11-13 22:59:24 +00006 *
7 * @package CodeIgniter
8 * @author ExpressionEngine Dev Team
Greg Aker0711dc82011-01-05 10:49:40 -06009 * @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
Derek Allard2067d1a2008-11-13 22:59:24 +000010 * @license http://codeigniter.com/user_guide/license.html
11 * @link http://codeigniter.com
12 * @since Version 1.0
13 * @filesource
14 */
15
16// ------------------------------------------------------------------------
17
18/**
19 * CodeIgniter Application Controller Class
20 *
Roger Simms78a1cf22010-04-25 12:50:53 +010021 * This class object is the super class that every library in
Derek Allard2067d1a2008-11-13 22:59:24 +000022 * CodeIgniter will be assigned to.
23 *
24 * @package CodeIgniter
25 * @subpackage Libraries
26 * @category Libraries
27 * @author ExpressionEngine Dev Team
28 * @link http://codeigniter.com/user_guide/general/controllers.html
29 */
Greg Aker4abfa682010-11-10 14:44:26 -060030class CI_Controller {
31
32 private static $instance;
Barry Mienydd671972010-10-04 16:33:58 +020033
Derek Allard2067d1a2008-11-13 22:59:24 +000034 /**
35 * Constructor
Derek Allard2067d1a2008-11-13 22:59:24 +000036 */
Greg Aker4abfa682010-11-10 14:44:26 -060037 public function __construct()
Barry Mienydd671972010-10-04 16:33:58 +020038 {
Greg Aker4abfa682010-11-10 14:44:26 -060039 self::$instance =& $this;
Greg Aker63277b82010-11-09 13:46:13 -060040
Derek Allard2067d1a2008-11-13 22:59:24 +000041 // Assign all the class objects that were instantiated by the
Barry Mienydd671972010-10-04 16:33:58 +020042 // bootstrap file (CodeIgniter.php) to local class variables
Derek Jones8f9f9772010-03-02 13:28:24 -060043 // so that CI can run as one big super object.
44 foreach (is_loaded() as $var => $class)
Derek Allard2067d1a2008-11-13 22:59:24 +000045 {
46 $this->$var =& load_class($class);
47 }
48
Greg Aker4abfa682010-11-10 14:44:26 -060049 $this->load =& load_class('Loader', 'core');
Barry Mienydd671972010-10-04 16:33:58 +020050
Greg Aker4abfa682010-11-10 14:44:26 -060051 $this->load->_base_classes =& is_loaded();
Barry Mienydd671972010-10-04 16:33:58 +020052
Greg Aker4abfa682010-11-10 14:44:26 -060053 $this->load->_ci_autoloader();
Derek Allard2067d1a2008-11-13 22:59:24 +000054
Derek Jones8f9f9772010-03-02 13:28:24 -060055 log_message('debug', "Controller Class Initialized");
Barry Mienydd671972010-10-04 16:33:58 +020056
Derek Jones8f9f9772010-03-02 13:28:24 -060057 }
Derek Allard2067d1a2008-11-13 22:59:24 +000058
Greg Aker4abfa682010-11-10 14:44:26 -060059 public static function &get_instance()
60 {
61 return self::$instance;
62 }
Derek Allard2067d1a2008-11-13 22:59:24 +000063}
Derek Jones6c1294b2010-03-25 10:32:22 -050064// END Controller class
Derek Allard2067d1a2008-11-13 22:59:24 +000065
66/* End of file Controller.php */
Derek Jonesc68dfbf2010-03-02 12:59:23 -060067/* Location: ./system/core/Controller.php */