summaryrefslogtreecommitdiffstats
path: root/system/core/Output.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-02-24 10:31:36 +0100
committerAndrey Andreev <narf@devilix.net>2014-02-24 10:31:36 +0100
commitc26b9ebb00e29be2e972fece3bcf73d33249a64b (patch)
treeb10dac6db61cc657bf5c906a8495994f935c102f /system/core/Output.php
parent82179bf31f00564282f2a4d9873c6107b6732631 (diff)
Don't use globals
- Use load_class() to get objects during bootstrap process. - Change load_class() to accept a class constructor parameter instead of previously unused class name prefix. - Change CI_Router::__construct() to accept as a parameter.
Diffstat (limited to 'system/core/Output.php')
-rw-r--r--system/core/Output.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/system/core/Output.php b/system/core/Output.php
index e8c1c3972..2811a73bc 100644
--- a/system/core/Output.php
+++ b/system/core/Output.php
@@ -401,10 +401,11 @@ class CI_Output {
*/
public function _display($output = '')
{
- // Note: We use globals because we can't use $CI =& get_instance()
+ // Note: We use load_class() because we can't use $CI =& get_instance()
// since this function is sometimes called by the caching mechanism,
// which happens before the CI super object is available.
- global $BM, $CFG;
+ $BM =& load_class('Benchmark', 'core');
+ $CFG =& load_class('Config', 'core');
// Grab the super object if we can.
if (class_exists('CI_Controller', FALSE))