blob: ec86b79201b45e3e12873c861068d758c0214bb0 [file] [log] [blame]
Derek Jones4b9c6292011-07-01 17:40:48 -05001<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
Derek Allard2067d1a2008-11-13 22:59:24 +00002/**
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;
Derek Jones4b9c6292011-07-01 17:40:48 -050040
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 Aker0c9ee4a2011-04-20 09:40:17 -050051 $this->load->set_base_classes()->ci_autoloader();
Derek Jones4b9c6292011-07-01 17:40:48 -050052
Derek Jones8f9f9772010-03-02 13:28:24 -060053 log_message('debug', "Controller Class Initialized");
Derek Jones8f9f9772010-03-02 13:28:24 -060054 }
Derek Allard2067d1a2008-11-13 22:59:24 +000055
Greg Aker4abfa682010-11-10 14:44:26 -060056 public static function &get_instance()
57 {
58 return self::$instance;
59 }
Derek Allard2067d1a2008-11-13 22:59:24 +000060}
Derek Jones6c1294b2010-03-25 10:32:22 -050061// END Controller class
Derek Allard2067d1a2008-11-13 22:59:24 +000062
63/* End of file Controller.php */
Derek Jonesc68dfbf2010-03-02 12:59:23 -060064/* Location: ./system/core/Controller.php */