From 864d38b77ed347885c22e1579ac0ba7a5360ab50 Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Sat, 12 Mar 2016 15:49:37 +1100 Subject: [PATCH] Why are these static? ...seriously, why are they static? --- modules/cms/classes/Router.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/cms/classes/Router.php b/modules/cms/classes/Router.php index e7d6dd599..b0bc76bfa 100644 --- a/modules/cms/classes/Router.php +++ b/modules/cms/classes/Router.php @@ -54,12 +54,12 @@ class Router /** * @var array Contains the URL map - the list of page file names and corresponding URL patterns. */ - protected static $urlMap = []; + protected $urlMap = []; /** * October\Rain\Router\Router Router object with routes preloaded. */ - protected static $routerObj; + protected $routerObj; /** * Creates the router instance. @@ -169,8 +169,8 @@ class Router */ protected function getRouterObject() { - if (self::$routerObj !== null) { - return self::$routerObj; + if ($this->routerObj !== null) { + return $this->routerObj; } /* @@ -186,7 +186,7 @@ class Router */ $router->sortRules(); - return self::$routerObj = $router; + return $this->routerObj = $router; } /** @@ -195,11 +195,11 @@ class Router */ protected function getUrlMap() { - if (!count(self::$urlMap)) { + if (!count($this->urlMap)) { $this->loadUrlMap(); } - return self::$urlMap; + return $this->urlMap; } /** @@ -235,7 +235,7 @@ class Router $map[] = ['file' => $page->getFileName(), 'pattern' => $page->url]; } - self::$urlMap = $map; + $this->urlMap = $map; if ($cacheable) { Cache::put($key, serialize($map), Config::get('cms.urlCacheTtl', 1)); } @@ -243,7 +243,7 @@ class Router return false; } - self::$urlMap = $unserialized; + $this->urlMap = $unserialized; return true; }