blob: 5d945c26ac5d344448005eed73da7e4ee77071c9 [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 * CI_BASE - For PHP 4
20 *
21 * This file is used only when Code Igniter is being run under PHP 4.
22 * Since PHP 4 has such poor object handling we had to come up with
23 * a hack to resolve some scoping problems. PHP 5 doesn't suffer from
24 * this problem so we load one of two files based on the version of
25 * PHP being run.
26 *
27 * @package CodeIgniter
28 * @subpackage codeigniter
29 * @category front-controller
30 * @author Rick Ellis
31 * @link http://www.codeigniter.com/user_guide/
32 */
33 class CI_Base extends CI_Loader {
34
35 function CI_Base()
36 {
37 global $OBJ;
38 parent::CI_Loader();
39 $this->load =& $this;
40 $OBJ = $this->load;
41 }
42}
43
44function &get_instance()
45{
46 global $OBJ, $CI;
47
48 if (is_object($CI))
49 {
50 return $CI;
51 }
52 else
53 {
54 return $OBJ->load;
55 }
56}
57
58?>