Skip to content

Commit

Permalink
Merge pull request #3 from kazsaj/master
Browse files Browse the repository at this point in the history
Router variable changed to static
  • Loading branch information
Tom Walder committed Jun 23, 2014
2 parents ab68e1e + 1cea541 commit ef35c7d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Docnet/JAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class JAPI
/**
* @var JAPI\Router
*/
private $obj_router = NULL;
private static $obj_router = NULL;

/**
* @var JAPI\Logger
Expand Down Expand Up @@ -140,12 +140,12 @@ protected function jsonError($mix_message = NULL, $int_code = 500)
*
* @return JAPI\Router
*/
public function getRouter()
public static function getRouter()
{
if (NULL === $this->obj_router) {
$this->obj_router = new JAPI\Router();
if (NULL === self::$obj_router) {
self::$obj_router = new JAPI\Router();
}
return $this->obj_router;
return self::$obj_router;
}

/**
Expand All @@ -155,7 +155,7 @@ public function getRouter()
*/
public function setRouter(JAPI\Interfaces\Router $obj_router)
{
$this->obj_router = $obj_router;
self::$obj_router = $obj_router;
}

/**
Expand Down

0 comments on commit ef35c7d

Please sign in to comment.