| 12694 |
anikendra |
1 |
<?php (defined('BASEPATH')) OR exit('No direct script access allowed');
|
|
|
2 |
|
|
|
3 |
/* load MX core classes */
|
|
|
4 |
require_once dirname(__FILE__).'/Lang.php';
|
|
|
5 |
require_once dirname(__FILE__).'/Config.php';
|
|
|
6 |
|
|
|
7 |
/**
|
|
|
8 |
* Modular Extensions - HMVC
|
|
|
9 |
*
|
|
|
10 |
* Adapted from the CodeIgniter Core Classes
|
|
|
11 |
* @link http://codeigniter.com
|
|
|
12 |
*
|
|
|
13 |
* Description:
|
|
|
14 |
* This library extends the CodeIgniter CI_Controller class and creates an application
|
|
|
15 |
* object allowing use of the HMVC design pattern.
|
|
|
16 |
*
|
|
|
17 |
* Install this file as application/third_party/MX/Base.php
|
|
|
18 |
*
|
|
|
19 |
* @copyright Copyright (c) 2011 Wiredesignz
|
|
|
20 |
* @version 5.4
|
|
|
21 |
*
|
|
|
22 |
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
23 |
* of this software and associated documentation files (the "Software"), to deal
|
|
|
24 |
* in the Software without restriction, including without limitation the rights
|
|
|
25 |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
26 |
* copies of the Software, and to permit persons to whom the Software is
|
|
|
27 |
* furnished to do so, subject to the following conditions:
|
|
|
28 |
*
|
|
|
29 |
* The above copyright notice and this permission notice shall be included in
|
|
|
30 |
* all copies or substantial portions of the Software.
|
|
|
31 |
*
|
|
|
32 |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
33 |
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
34 |
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
35 |
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
36 |
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
37 |
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
38 |
* THE SOFTWARE.
|
|
|
39 |
**/
|
|
|
40 |
class CI extends CI_Controller
|
|
|
41 |
{
|
|
|
42 |
public static $APP;
|
|
|
43 |
|
|
|
44 |
public function __construct() {
|
|
|
45 |
|
|
|
46 |
/* assign the application instance */
|
|
|
47 |
self::$APP = $this;
|
|
|
48 |
|
|
|
49 |
global $LANG, $CFG;
|
|
|
50 |
|
|
|
51 |
/* re-assign language and config for modules */
|
|
|
52 |
if ( ! is_a($LANG, 'MX_Lang')) $LANG = new MX_Lang;
|
|
|
53 |
if ( ! is_a($CFG, 'MX_Config')) $CFG = new MX_Config;
|
|
|
54 |
|
|
|
55 |
parent::__construct();
|
|
|
56 |
}
|
|
|
57 |
}
|
|
|
58 |
|
|
|
59 |
/* create the application object */
|
|
|
60 |
new CI;
|