public function __construct($params = null) { if (!function_exists('json_encode') || !function_exists('json_decode')) { throw new Exception('Json support not available! Application will now exit.'); } //echo "construct<br />"; self::$method = self::getRequestMethod(); $this->path = $_SERVER['REQUEST_URI']; if ($params !== null) { self::$Params = $params; } }