blob: eccf58ed830035f8c2776cc44beaf682c7fd65e1 [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
admin6871d952006-10-04 00:36:18 +000023 * a hack (and a really ugly one at that...) to resolve some scoping
24 * problems. PHP 5 doesn't suffer from this problem so we load one of
25 * two files based on the version of PHP being run.
adminb0dd10f2006-08-25 17:25:49 +000026 *
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
admin6871d952006-10-04 00:36:18 +000048 return (is_object($CI)) ? $CI : $OBJ->load;
adminb0dd10f2006-08-25 17:25:49 +000049}
50
51?>