summaryrefslogtreecommitdiffstats
path: root/system/core/Router.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/Router.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/Router.php')
-rw-r--r--system/core/Router.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/system/core/Router.php b/system/core/Router.php
index 05263b153..2448d9c8c 100644
--- a/system/core/Router.php
+++ b/system/core/Router.php
@@ -109,10 +109,8 @@ class CI_Router {
*
* @return void
*/
- public function __construct()
+ public function __construct($routing = NULL)
{
- global $routing;
-
$this->config =& load_class('Config', 'core');
$this->uri =& load_class('URI', 'core');
@@ -120,7 +118,7 @@ class CI_Router {
$this->_set_routing();
// Set any routing overrides that may exist in the main index file
- if (isset($routing) && is_array($routing))
+ if (is_array($routing))
{
if (isset($routing['directory']))
{