@@ -65,17 +65,17 @@ |
||
65 | 65 | */ |
66 | 66 | public function __construct() |
67 | 67 | { |
68 | - self::$instance =& $this; |
|
68 | + self::$instance = & $this; |
|
69 | 69 | |
70 | 70 | // Assign all the class objects that were instantiated by the |
71 | 71 | // bootstrap file (CodeIgniter.php) to local class variables |
72 | 72 | // so that CI can run as one big super object. |
73 | 73 | foreach (is_loaded() as $var => $class) |
74 | 74 | { |
75 | - $this->$var =& load_class($class); |
|
75 | + $this->$var = & load_class($class); |
|
76 | 76 | } |
77 | 77 | |
78 | - $this->load =& load_class('Loader', 'core'); |
|
78 | + $this->load = & load_class('Loader', 'core'); |
|
79 | 79 | $this->load->initialize(); |
80 | 80 | log_message('info', 'Controller Class Initialized'); |
81 | 81 | } |
@@ -251,7 +251,7 @@ |
||
251 | 251 | if (FALSE !== strpos($filepath, '/')) |
252 | 252 | { |
253 | 253 | $x = explode('/', $filepath); |
254 | - $filepath = $x[count($x)-2].'/'.end($x); |
|
254 | + $filepath = $x[count($x) - 2].'/'.end($x); |
|
255 | 255 | } |
256 | 256 | |
257 | 257 | $template = 'html'.DIRECTORY_SEPARATOR.'error_php'; |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | * |
63 | 63 | * @var array |
64 | 64 | */ |
65 | - public $hooks = array(); |
|
65 | + public $hooks = array(); |
|
66 | 66 | |
67 | 67 | /** |
68 | 68 | * Array with class objects to use hooks methods |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | */ |
88 | 88 | public function __construct() |
89 | 89 | { |
90 | - $CFG =& load_class('Config', 'core'); |
|
90 | + $CFG = & load_class('Config', 'core'); |
|
91 | 91 | log_message('info', 'Hooks Class Initialized'); |
92 | 92 | |
93 | 93 | // If hooks are not enabled in the config file |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | return; |
115 | 115 | } |
116 | 116 | |
117 | - $this->hooks =& $hook; |
|
117 | + $this->hooks = & $hook; |
|
118 | 118 | $this->enabled = TRUE; |
119 | 119 | } |
120 | 120 | |
@@ -206,9 +206,9 @@ discard block |
||
206 | 206 | } |
207 | 207 | |
208 | 208 | // Determine and class and/or function names |
209 | - $class = empty($data['class']) ? FALSE : $data['class']; |
|
210 | - $function = empty($data['function']) ? FALSE : $data['function']; |
|
211 | - $params = isset($data['params']) ? $data['params'] : ''; |
|
209 | + $class = empty($data['class']) ? FALSE : $data['class']; |
|
210 | + $function = empty($data['function']) ? FALSE : $data['function']; |
|
211 | + $params = isset($data['params']) ? $data['params'] : ''; |
|
212 | 212 | |
213 | 213 | if (empty($function)) |
214 | 214 | { |
@@ -137,17 +137,17 @@ |
||
137 | 137 | */ |
138 | 138 | public function __construct() |
139 | 139 | { |
140 | - $this->_allow_get_array = (config_item('allow_get_array') === TRUE); |
|
141 | - $this->_enable_xss = (config_item('global_xss_filtering') === TRUE); |
|
142 | - $this->_enable_csrf = (config_item('csrf_protection') === TRUE); |
|
143 | - $this->_standardize_newlines = (bool) config_item('standardize_newlines'); |
|
140 | + $this->_allow_get_array = (config_item('allow_get_array') === TRUE); |
|
141 | + $this->_enable_xss = (config_item('global_xss_filtering') === TRUE); |
|
142 | + $this->_enable_csrf = (config_item('csrf_protection') === TRUE); |
|
143 | + $this->_standardize_newlines = (bool) config_item('standardize_newlines'); |
|
144 | 144 | |
145 | - $this->security =& load_class('Security', 'core'); |
|
145 | + $this->security = & load_class('Security', 'core'); |
|
146 | 146 | |
147 | 147 | // Do we need the UTF-8 class? |
148 | 148 | if (UTF8_ENABLED === TRUE) |
149 | 149 | { |
150 | - $this->uni =& load_class('Utf8', 'core'); |
|
150 | + $this->uni = & load_class('Utf8', 'core'); |
|
151 | 151 | } |
152 | 152 | |
153 | 153 | // Sanitize global arrays |
@@ -53,14 +53,14 @@ discard block |
||
53 | 53 | * |
54 | 54 | * @var array |
55 | 55 | */ |
56 | - public $language = array(); |
|
56 | + public $language = array(); |
|
57 | 57 | |
58 | 58 | /** |
59 | 59 | * List of loaded language files |
60 | 60 | * |
61 | 61 | * @var array |
62 | 62 | */ |
63 | - public $is_loaded = array(); |
|
63 | + public $is_loaded = array(); |
|
64 | 64 | |
65 | 65 | /** |
66 | 66 | * Class constructor |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | |
109 | 109 | if (empty($idiom) OR ! preg_match('/^[a-z_-]+$/i', $idiom)) |
110 | 110 | { |
111 | - $config =& get_config(); |
|
111 | + $config = & get_config(); |
|
112 | 112 | $idiom = empty($config['language']) ? 'english' : $config['language']; |
113 | 113 | } |
114 | 114 |
@@ -63,63 +63,63 @@ discard block |
||
63 | 63 | * |
64 | 64 | * @var array |
65 | 65 | */ |
66 | - protected $_ci_view_paths = array(VIEWPATH => TRUE); |
|
66 | + protected $_ci_view_paths = array(VIEWPATH => TRUE); |
|
67 | 67 | |
68 | 68 | /** |
69 | 69 | * List of paths to load libraries from |
70 | 70 | * |
71 | 71 | * @var array |
72 | 72 | */ |
73 | - protected $_ci_library_paths = array(APPPATH, BASEPATH); |
|
73 | + protected $_ci_library_paths = array(APPPATH, BASEPATH); |
|
74 | 74 | |
75 | 75 | /** |
76 | 76 | * List of paths to load models from |
77 | 77 | * |
78 | 78 | * @var array |
79 | 79 | */ |
80 | - protected $_ci_model_paths = array(APPPATH); |
|
80 | + protected $_ci_model_paths = array(APPPATH); |
|
81 | 81 | |
82 | 82 | /** |
83 | 83 | * List of paths to load helpers from |
84 | 84 | * |
85 | 85 | * @var array |
86 | 86 | */ |
87 | - protected $_ci_helper_paths = array(APPPATH, BASEPATH); |
|
87 | + protected $_ci_helper_paths = array(APPPATH, BASEPATH); |
|
88 | 88 | |
89 | 89 | /** |
90 | 90 | * List of cached variables |
91 | 91 | * |
92 | 92 | * @var array |
93 | 93 | */ |
94 | - protected $_ci_cached_vars = array(); |
|
94 | + protected $_ci_cached_vars = array(); |
|
95 | 95 | |
96 | 96 | /** |
97 | 97 | * List of loaded classes |
98 | 98 | * |
99 | 99 | * @var array |
100 | 100 | */ |
101 | - protected $_ci_classes = array(); |
|
101 | + protected $_ci_classes = array(); |
|
102 | 102 | |
103 | 103 | /** |
104 | 104 | * List of loaded models |
105 | 105 | * |
106 | 106 | * @var array |
107 | 107 | */ |
108 | - protected $_ci_models = array(); |
|
108 | + protected $_ci_models = array(); |
|
109 | 109 | |
110 | 110 | /** |
111 | 111 | * List of loaded helpers |
112 | 112 | * |
113 | 113 | * @var array |
114 | 114 | */ |
115 | - protected $_ci_helpers = array(); |
|
115 | + protected $_ci_helpers = array(); |
|
116 | 116 | |
117 | 117 | /** |
118 | 118 | * List of class name mappings |
119 | 119 | * |
120 | 120 | * @var array |
121 | 121 | */ |
122 | - protected $_ci_varmap = array( |
|
122 | + protected $_ci_varmap = array( |
|
123 | 123 | 'unit_test' => 'unit', |
124 | 124 | 'user_agent' => 'agent' |
125 | 125 | ); |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | public function __construct() |
137 | 137 | { |
138 | 138 | $this->_ci_ob_level = ob_get_level(); |
139 | - $this->_ci_classes =& is_loaded(); |
|
139 | + $this->_ci_classes = & is_loaded(); |
|
140 | 140 | |
141 | 141 | log_message('info', 'Loader Class Initialized'); |
142 | 142 | } |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | return $this; |
270 | 270 | } |
271 | 271 | |
272 | - $CI =& get_instance(); |
|
272 | + $CI = & get_instance(); |
|
273 | 273 | if (isset($CI->$name)) |
274 | 274 | { |
275 | 275 | throw new RuntimeException('The model name you are loading is the name of a resource that is already being used: '.$name); |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | public function database($params = '', $return = FALSE, $query_builder = NULL) |
341 | 341 | { |
342 | 342 | // Grab the super object |
343 | - $CI =& get_instance(); |
|
343 | + $CI = & get_instance(); |
|
344 | 344 | |
345 | 345 | // Do we even need to load the database class? |
346 | 346 | if ($return === FALSE && $query_builder === NULL && isset($CI->db) && is_object($CI->db) && ! empty($CI->db->conn_id)) |
@@ -360,7 +360,7 @@ discard block |
||
360 | 360 | $CI->db = ''; |
361 | 361 | |
362 | 362 | // Load the DB class |
363 | - $CI->db =& DB($params, $query_builder); |
|
363 | + $CI->db = & DB($params, $query_builder); |
|
364 | 364 | return $this; |
365 | 365 | } |
366 | 366 | |
@@ -375,12 +375,12 @@ discard block |
||
375 | 375 | */ |
376 | 376 | public function dbutil($db = NULL, $return = FALSE) |
377 | 377 | { |
378 | - $CI =& get_instance(); |
|
378 | + $CI = & get_instance(); |
|
379 | 379 | |
380 | 380 | if ( ! is_object($db) OR ! ($db instanceof CI_DB)) |
381 | 381 | { |
382 | 382 | class_exists('CI_DB', FALSE) OR $this->database(); |
383 | - $db =& $CI->db; |
|
383 | + $db = & $CI->db; |
|
384 | 384 | } |
385 | 385 | |
386 | 386 | require_once(BASEPATH.'database/DB_utility.php'); |
@@ -407,11 +407,11 @@ discard block |
||
407 | 407 | */ |
408 | 408 | public function dbforge($db = NULL, $return = FALSE) |
409 | 409 | { |
410 | - $CI =& get_instance(); |
|
410 | + $CI = & get_instance(); |
|
411 | 411 | if ( ! is_object($db) OR ! ($db instanceof CI_DB)) |
412 | 412 | { |
413 | 413 | class_exists('CI_DB', FALSE) OR $this->database(); |
414 | - $db =& $CI->db; |
|
414 | + $db = & $CI->db; |
|
415 | 415 | } |
416 | 416 | |
417 | 417 | require_once(BASEPATH.'database/DB_forge.php'); |
@@ -744,7 +744,7 @@ discard block |
||
744 | 744 | $this->_ci_view_paths = array($path.'views/' => $view_cascade) + $this->_ci_view_paths; |
745 | 745 | |
746 | 746 | // Add config file path |
747 | - $config =& $this->_ci_get_component('config'); |
|
747 | + $config = & $this->_ci_get_component('config'); |
|
748 | 748 | $config->_config_paths[] = $path; |
749 | 749 | |
750 | 750 | return $this; |
@@ -779,7 +779,7 @@ discard block |
||
779 | 779 | */ |
780 | 780 | public function remove_package_path($path = '') |
781 | 781 | { |
782 | - $config =& $this->_ci_get_component('config'); |
|
782 | + $config = & $this->_ci_get_component('config'); |
|
783 | 783 | |
784 | 784 | if ($path === '') |
785 | 785 | { |
@@ -880,12 +880,12 @@ discard block |
||
880 | 880 | |
881 | 881 | // This allows anything loaded using $this->load (views, files, etc.) |
882 | 882 | // to become accessible from within the Controller and Model functions. |
883 | - $_ci_CI =& get_instance(); |
|
883 | + $_ci_CI = & get_instance(); |
|
884 | 884 | foreach (get_object_vars($_ci_CI) as $_ci_key => $_ci_var) |
885 | 885 | { |
886 | 886 | if ( ! isset($this->$_ci_key)) |
887 | 887 | { |
888 | - $this->$_ci_key =& $_ci_CI->$_ci_key; |
|
888 | + $this->$_ci_key = & $_ci_CI->$_ci_key; |
|
889 | 889 | } |
890 | 890 | } |
891 | 891 | |
@@ -1022,7 +1022,7 @@ discard block |
||
1022 | 1022 | // return a new instance of the object |
1023 | 1023 | if ($object_name !== NULL) |
1024 | 1024 | { |
1025 | - $CI =& get_instance(); |
|
1025 | + $CI = & get_instance(); |
|
1026 | 1026 | if ( ! isset($CI->$object_name)) |
1027 | 1027 | { |
1028 | 1028 | return $this->_ci_init_library($class, '', $params, $object_name); |
@@ -1083,7 +1083,7 @@ discard block |
||
1083 | 1083 | // return a new instance of the object |
1084 | 1084 | if ($object_name !== NULL) |
1085 | 1085 | { |
1086 | - $CI =& get_instance(); |
|
1086 | + $CI = & get_instance(); |
|
1087 | 1087 | if ( ! isset($CI->$object_name)) |
1088 | 1088 | { |
1089 | 1089 | return $this->_ci_init_library($library_name, $prefix, $params, $object_name); |
@@ -1226,7 +1226,7 @@ discard block |
||
1226 | 1226 | } |
1227 | 1227 | |
1228 | 1228 | // Don't overwrite existing properties |
1229 | - $CI =& get_instance(); |
|
1229 | + $CI = & get_instance(); |
|
1230 | 1230 | if (isset($CI->$object_name)) |
1231 | 1231 | { |
1232 | 1232 | if ($CI->$object_name instanceof $class_name) |
@@ -1359,7 +1359,7 @@ discard block |
||
1359 | 1359 | */ |
1360 | 1360 | protected function &_ci_get_component($component) |
1361 | 1361 | { |
1362 | - $CI =& get_instance(); |
|
1362 | + $CI = & get_instance(); |
|
1363 | 1363 | return $CI->$component; |
1364 | 1364 | } |
1365 | 1365 |
@@ -113,7 +113,7 @@ |
||
113 | 113 | */ |
114 | 114 | public function __construct() |
115 | 115 | { |
116 | - $config =& get_config(); |
|
116 | + $config = & get_config(); |
|
117 | 117 | |
118 | 118 | $this->_log_path = ($config['log_path'] !== '') ? $config['log_path'] : APPPATH.'logs/'; |
119 | 119 | $this->_file_ext = (isset($config['log_file_extension']) && $config['log_file_extension'] !== '') |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | * |
77 | 77 | * @var array |
78 | 78 | */ |
79 | - public $mimes = array(); |
|
79 | + public $mimes = array(); |
|
80 | 80 | |
81 | 81 | /** |
82 | 82 | * Mime-type for the current page |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | * |
112 | 112 | * @var array |
113 | 113 | */ |
114 | - protected $_profiler_sections = array(); |
|
114 | + protected $_profiler_sections = array(); |
|
115 | 115 | |
116 | 116 | /** |
117 | 117 | * Parse markers flag |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | ); |
140 | 140 | |
141 | 141 | // Get mime types for later |
142 | - $this->mimes =& get_mimes(); |
|
142 | + $this->mimes = & get_mimes(); |
|
143 | 143 | |
144 | 144 | log_message('info', 'Output Class Initialized'); |
145 | 145 | } |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | // Is this extension supported? |
238 | 238 | if (isset($this->mimes[$extension])) |
239 | 239 | { |
240 | - $mime_type =& $this->mimes[$extension]; |
|
240 | + $mime_type = & $this->mimes[$extension]; |
|
241 | 241 | |
242 | 242 | if (is_array($mime_type)) |
243 | 243 | { |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | { |
307 | 307 | if (strncasecmp($header, $headers[$i], $l = strlen($header)) === 0) |
308 | 308 | { |
309 | - return trim(substr($headers[$i], $l+1)); |
|
309 | + return trim(substr($headers[$i], $l + 1)); |
|
310 | 310 | } |
311 | 311 | } |
312 | 312 | |
@@ -407,13 +407,13 @@ discard block |
||
407 | 407 | // Note: We use load_class() because we can't use $CI =& get_instance() |
408 | 408 | // since this function is sometimes called by the caching mechanism, |
409 | 409 | // which happens before the CI super object is available. |
410 | - $BM =& load_class('Benchmark', 'core'); |
|
411 | - $CFG =& load_class('Config', 'core'); |
|
410 | + $BM = & load_class('Benchmark', 'core'); |
|
411 | + $CFG = & load_class('Config', 'core'); |
|
412 | 412 | |
413 | 413 | // Grab the super object if we can. |
414 | 414 | if (class_exists('CI_Controller', FALSE)) |
415 | 415 | { |
416 | - $CI =& get_instance(); |
|
416 | + $CI = & get_instance(); |
|
417 | 417 | } |
418 | 418 | |
419 | 419 | // -------------------------------------------------------------------- |
@@ -421,7 +421,7 @@ discard block |
||
421 | 421 | // Set the output data |
422 | 422 | if ($output === '') |
423 | 423 | { |
424 | - $output =& $this->final_output; |
|
424 | + $output = & $this->final_output; |
|
425 | 425 | } |
426 | 426 | |
427 | 427 | // -------------------------------------------------------------------- |
@@ -542,7 +542,7 @@ discard block |
||
542 | 542 | */ |
543 | 543 | public function _write_cache($output) |
544 | 544 | { |
545 | - $CI =& get_instance(); |
|
545 | + $CI = & get_instance(); |
|
546 | 546 | $path = $CI->config->item('cache_path'); |
547 | 547 | $cache_path = ($path === '') ? APPPATH.'cache/' : $path; |
548 | 548 | |
@@ -726,7 +726,7 @@ discard block |
||
726 | 726 | */ |
727 | 727 | public function delete_cache($uri = '') |
728 | 728 | { |
729 | - $CI =& get_instance(); |
|
729 | + $CI = & get_instance(); |
|
730 | 730 | $cache_path = $CI->config->item('cache_path'); |
731 | 731 | if ($cache_path === '') |
732 | 732 | { |
@@ -62,21 +62,21 @@ discard block |
||
62 | 62 | * |
63 | 63 | * @var array |
64 | 64 | */ |
65 | - public $routes = array(); |
|
65 | + public $routes = array(); |
|
66 | 66 | |
67 | 67 | /** |
68 | 68 | * Current class name |
69 | 69 | * |
70 | 70 | * @var string |
71 | 71 | */ |
72 | - public $class = ''; |
|
72 | + public $class = ''; |
|
73 | 73 | |
74 | 74 | /** |
75 | 75 | * Current method name |
76 | 76 | * |
77 | 77 | * @var string |
78 | 78 | */ |
79 | - public $method = 'index'; |
|
79 | + public $method = 'index'; |
|
80 | 80 | |
81 | 81 | /** |
82 | 82 | * Sub-directory that contains the requested controller class |
@@ -123,8 +123,8 @@ discard block |
||
123 | 123 | */ |
124 | 124 | public function __construct($routing = NULL) |
125 | 125 | { |
126 | - $this->config =& load_class('Config', 'core'); |
|
127 | - $this->uri =& load_class('URI', 'core'); |
|
126 | + $this->config = & load_class('Config', 'core'); |
|
127 | + $this->uri = & load_class('URI', 'core'); |
|
128 | 128 | |
129 | 129 | $this->enable_query_strings = ( ! is_cli() && $this->config->item('enable_query_strings') === TRUE); |
130 | 130 | |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | if (is_array($routing)) |
137 | 137 | { |
138 | 138 | empty($routing['controller']) OR $this->set_class($routing['controller']); |
139 | - empty($routing['function']) OR $this->set_method($routing['function']); |
|
139 | + empty($routing['function']) OR $this->set_method($routing['function']); |
|
140 | 140 | } |
141 | 141 | |
142 | 142 | log_message('info', 'Router Class Initialized'); |