blob: ef3fc67f4eca6649106157a574cab8e3e18bc9fd [file] [log] [blame]
adminb0dd10f2006-08-25 17:25:49 +00001<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
2/**
3 * Code Igniter
4 *
5 * An open source application development framework for PHP 4.3.2 or newer
6 *
7 * @package CodeIgniter
8 * @author Rick Ellis
9 * @copyright Copyright (c) 2006, pMachine, Inc.
10 * @license http://www.codeignitor.com/user_guide/license.html
11 * @link http://www.codeigniter.com
12 * @since Version 1.3
13 * @filesource
14 */
15
16
17// ------------------------------------------------------------------------
18
19/**
20 * CI_BASE - For PHP 5
21 *
22 * This file contains some code used only when Code Igniter is being
23 * run under PHP 5. It allows us to manage the CI super object more
24 * gracefully than what is possible with PHP 4.
25 *
26 * @package CodeIgniter
27 * @subpackage codeigniter
28 * @category front-controller
29 * @author Rick Ellis
30 * @link http://www.codeigniter.com/user_guide/
31 */
32
33class CI_Base {
34
35 public function CI_Base()
36 {
37 $instance =& _load_class('Instance');
38 $instance->set_instance($this);
39 }
40}
41
42class Instance {
43 public static $instance;
44
45 public function set_instance(&$object)
46 {
47 self::$instance =& $object;
48 }
49
50 public function &get_instance()
51 {
52 return self::$instance;
53 }
54}
55
56function &get_instance()
57{
58 $instance =& _load_class('Instance');
59 return $instance->get_instance();
60}
61
62?>