Skip to content

Commit ef35c7d

Browse files
author
Tom Walder
committed
Merge pull request #3 from kazsaj/master
Router variable changed to static
2 parents ab68e1e + 1cea541 commit ef35c7d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Docnet/JAPI.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class JAPI
3939
/**
4040
* @var JAPI\Router
4141
*/
42-
private $obj_router = NULL;
42+
private static $obj_router = NULL;
4343

4444
/**
4545
* @var JAPI\Logger
@@ -140,12 +140,12 @@ protected function jsonError($mix_message = NULL, $int_code = 500)
140140
*
141141
* @return JAPI\Router
142142
*/
143-
public function getRouter()
143+
public static function getRouter()
144144
{
145-
if (NULL === $this->obj_router) {
146-
$this->obj_router = new JAPI\Router();
145+
if (NULL === self::$obj_router) {
146+
self::$obj_router = new JAPI\Router();
147147
}
148-
return $this->obj_router;
148+
return self::$obj_router;
149149
}
150150

151151
/**
@@ -155,7 +155,7 @@ public function getRouter()
155155
*/
156156
public function setRouter(JAPI\Interfaces\Router $obj_router)
157157
{
158-
$this->obj_router = $obj_router;
158+
self::$obj_router = $obj_router;
159159
}
160160

161161
/**

0 commit comments

Comments
 (0)